Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/xdgshellclient_test.cpp
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | |||||
157 | { | 157 | { | ||
158 | Test::destroyWaylandConnection(); | 158 | Test::destroyWaylandConnection(); | ||
159 | } | 159 | } | ||
160 | 160 | | |||
161 | void TestXdgShellClient::testMapUnmapMap_data() | 161 | void TestXdgShellClient::testMapUnmapMap_data() | ||
162 | { | 162 | { | ||
163 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 163 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
164 | 164 | | |||
165 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
166 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 165 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
167 | } | 166 | } | ||
168 | 167 | | |||
169 | void TestXdgShellClient::testMapUnmapMap() | 168 | void TestXdgShellClient::testMapUnmapMap() | ||
170 | { | 169 | { | ||
171 | // this test verifies that mapping a previously mapped window works correctly | 170 | // this test verifies that mapping a previously mapped window works correctly | ||
172 | QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | 171 | QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | ||
173 | QVERIFY(clientAddedSpy.isValid()); | 172 | QVERIFY(clientAddedSpy.isValid()); | ||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Line(s) | 300 | { | |||
333 | QVERIFY(windowShownSpy.wait()); | 332 | QVERIFY(windowShownSpy.wait()); | ||
334 | QCOMPARE(transient->frameGeometry(), QRect(c->frameGeometry().topLeft() + QPoint(5, 10), QSize(50, 40))); | 333 | QCOMPARE(transient->frameGeometry(), QRect(c->frameGeometry().topLeft() + QPoint(5, 10), QSize(50, 40))); | ||
335 | } | 334 | } | ||
336 | 335 | | |||
337 | void TestXdgShellClient::testWindowOutputs_data() | 336 | void TestXdgShellClient::testWindowOutputs_data() | ||
338 | { | 337 | { | ||
339 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 338 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
340 | 339 | | |||
341 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
342 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 340 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
343 | } | 341 | } | ||
344 | 342 | | |||
345 | void TestXdgShellClient::testWindowOutputs() | 343 | void TestXdgShellClient::testWindowOutputs() | ||
346 | { | 344 | { | ||
347 | QScopedPointer<Surface> surface(Test::createSurface()); | 345 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
348 | QFETCH(Test::XdgShellSurfaceType, type); | 346 | QFETCH(Test::XdgShellSurfaceType, type); | ||
349 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | 347 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | ||
Show All 29 Lines | |||||
379 | QCOMPARE(surface->outputs().count(), 1); | 377 | QCOMPARE(surface->outputs().count(), 1); | ||
380 | QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); | 378 | QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); | ||
381 | } | 379 | } | ||
382 | 380 | | |||
383 | void TestXdgShellClient::testMinimizeActiveWindow_data() | 381 | void TestXdgShellClient::testMinimizeActiveWindow_data() | ||
384 | { | 382 | { | ||
385 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 383 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
386 | 384 | | |||
387 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
388 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 385 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
389 | } | 386 | } | ||
390 | 387 | | |||
391 | void TestXdgShellClient::testMinimizeActiveWindow() | 388 | void TestXdgShellClient::testMinimizeActiveWindow() | ||
392 | { | 389 | { | ||
393 | // this test verifies that when minimizing the active window it gets deactivated | 390 | // this test verifies that when minimizing the active window it gets deactivated | ||
394 | QScopedPointer<Surface> surface(Test::createSurface()); | 391 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
395 | QFETCH(Test::XdgShellSurfaceType, type); | 392 | QFETCH(Test::XdgShellSurfaceType, type); | ||
Show All 24 Lines | |||||
420 | QCOMPARE(workspace()->activeClient(), c); | 417 | QCOMPARE(workspace()->activeClient(), c); | ||
421 | } | 418 | } | ||
422 | 419 | | |||
423 | void TestXdgShellClient::testFullscreen_data() | 420 | void TestXdgShellClient::testFullscreen_data() | ||
424 | { | 421 | { | ||
425 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 422 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
426 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | 423 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||
427 | 424 | | |||
428 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | | |||
429 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | 425 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | ||
430 | 426 | | |||
431 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | | |||
432 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | 427 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | ||
433 | } | 428 | } | ||
434 | 429 | | |||
435 | void TestXdgShellClient::testFullscreen() | 430 | void TestXdgShellClient::testFullscreen() | ||
436 | { | 431 | { | ||
437 | // this test verifies that a window can be properly fullscreened | 432 | // this test verifies that a window can be properly fullscreened | ||
438 | QScopedPointer<Surface> surface(Test::createSurface()); | 433 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
439 | QFETCH(Test::XdgShellSurfaceType, type); | 434 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | |||||
497 | QCOMPARE(c->layer(), NormalLayer); | 492 | QCOMPARE(c->layer(), NormalLayer); | ||
498 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 493 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
499 | } | 494 | } | ||
500 | 495 | | |||
501 | void TestXdgShellClient::testFullscreenRestore_data() | 496 | void TestXdgShellClient::testFullscreenRestore_data() | ||
502 | { | 497 | { | ||
503 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 498 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
504 | 499 | | |||
505 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
506 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 500 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
507 | } | 501 | } | ||
508 | 502 | | |||
509 | void TestXdgShellClient::testFullscreenRestore() | 503 | void TestXdgShellClient::testFullscreenRestore() | ||
510 | { | 504 | { | ||
511 | // this test verifies that windows created fullscreen can be later properly restored | 505 | // this test verifies that windows created fullscreen can be later properly restored | ||
512 | QScopedPointer<Surface> surface(Test::createSurface()); | 506 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
513 | QFETCH(Test::XdgShellSurfaceType, type); | 507 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
558 | QVERIFY(!c->isFullScreen()); | 552 | QVERIFY(!c->isFullScreen()); | ||
559 | QCOMPARE(c->frameGeometry().size(), QSize(100, 50)); | 553 | QCOMPARE(c->frameGeometry().size(), QSize(100, 50)); | ||
560 | } | 554 | } | ||
561 | 555 | | |||
562 | void TestXdgShellClient::testUserCanSetFullscreen_data() | 556 | void TestXdgShellClient::testUserCanSetFullscreen_data() | ||
563 | { | 557 | { | ||
564 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 558 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
565 | 559 | | |||
566 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
567 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 560 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
568 | } | 561 | } | ||
569 | 562 | | |||
570 | void TestXdgShellClient::testUserCanSetFullscreen() | 563 | void TestXdgShellClient::testUserCanSetFullscreen() | ||
571 | { | 564 | { | ||
572 | QScopedPointer<Surface> surface(Test::createSurface()); | 565 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
573 | QFETCH(Test::XdgShellSurfaceType, type); | 566 | QFETCH(Test::XdgShellSurfaceType, type); | ||
574 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | 567 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | ||
575 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | 568 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | ||
576 | QVERIFY(c); | 569 | QVERIFY(c); | ||
577 | QVERIFY(c->isActive()); | 570 | QVERIFY(c->isActive()); | ||
578 | QVERIFY(!c->isFullScreen()); | 571 | QVERIFY(!c->isFullScreen()); | ||
579 | QVERIFY(c->userCanSetFullScreen()); | 572 | QVERIFY(c->userCanSetFullScreen()); | ||
580 | } | 573 | } | ||
581 | 574 | | |||
582 | void TestXdgShellClient::testUserSetFullscreen_data() | 575 | void TestXdgShellClient::testUserSetFullscreen_data() | ||
583 | { | 576 | { | ||
584 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 577 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
585 | 578 | | |||
586 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
587 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 579 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
588 | } | 580 | } | ||
589 | 581 | | |||
590 | void TestXdgShellClient::testUserSetFullscreen() | 582 | void TestXdgShellClient::testUserSetFullscreen() | ||
591 | { | 583 | { | ||
592 | QScopedPointer<Surface> surface(Test::createSurface()); | 584 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
593 | QFETCH(Test::XdgShellSurfaceType, type); | 585 | QFETCH(Test::XdgShellSurfaceType, type); | ||
594 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface( | 586 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface( | ||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
641 | QVERIFY(!c->isFullScreen()); | 633 | QVERIFY(!c->isFullScreen()); | ||
642 | } | 634 | } | ||
643 | 635 | | |||
644 | void TestXdgShellClient::testMaximizedToFullscreen_data() | 636 | void TestXdgShellClient::testMaximizedToFullscreen_data() | ||
645 | { | 637 | { | ||
646 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 638 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
647 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | 639 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||
648 | 640 | | |||
649 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | | |||
650 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | 641 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | ||
651 | 642 | | |||
652 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | | |||
653 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | 643 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | ||
654 | } | 644 | } | ||
655 | 645 | | |||
656 | void TestXdgShellClient::testMaximizedToFullscreen() | 646 | void TestXdgShellClient::testMaximizedToFullscreen() | ||
657 | { | 647 | { | ||
658 | // this test verifies that a window can be properly fullscreened after maximizing | 648 | // this test verifies that a window can be properly fullscreened after maximizing | ||
659 | QScopedPointer<Surface> surface(Test::createSurface()); | 649 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
660 | QFETCH(Test::XdgShellSurfaceType, type); | 650 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | |||||
733 | QVERIFY(!c->isFullScreen()); | 723 | QVERIFY(!c->isFullScreen()); | ||
734 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 724 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
735 | } | 725 | } | ||
736 | 726 | | |||
737 | void TestXdgShellClient::testWindowOpensLargerThanScreen_data() | 727 | void TestXdgShellClient::testWindowOpensLargerThanScreen_data() | ||
738 | { | 728 | { | ||
739 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 729 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
740 | 730 | | |||
741 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
742 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 731 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
743 | } | 732 | } | ||
744 | 733 | | |||
745 | void TestXdgShellClient::testWindowOpensLargerThanScreen() | 734 | void TestXdgShellClient::testWindowOpensLargerThanScreen() | ||
746 | { | 735 | { | ||
747 | // this test creates a window which is as large as the screen, but is decorated | 736 | // this test creates a window which is as large as the screen, but is decorated | ||
748 | // the window should get resized to fit into the screen, BUG: 366632 | 737 | // the window should get resized to fit into the screen, BUG: 366632 | ||
749 | QScopedPointer<Surface> surface(Test::createSurface()); | 738 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
Show All 19 Lines | |||||
769 | QEXPECT_FAIL("", "BUG 366632", Continue); | 758 | QEXPECT_FAIL("", "BUG 366632", Continue); | ||
770 | QVERIFY(sizeChangeRequestedSpy.wait(10)); | 759 | QVERIFY(sizeChangeRequestedSpy.wait(10)); | ||
771 | } | 760 | } | ||
772 | 761 | | |||
773 | void TestXdgShellClient::testHidden_data() | 762 | void TestXdgShellClient::testHidden_data() | ||
774 | { | 763 | { | ||
775 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 764 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
776 | 765 | | |||
777 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
778 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 766 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
779 | } | 767 | } | ||
780 | 768 | | |||
781 | void TestXdgShellClient::testHidden() | 769 | void TestXdgShellClient::testHidden() | ||
782 | { | 770 | { | ||
783 | // this test verifies that when hiding window it doesn't get shown | 771 | // this test verifies that when hiding window it doesn't get shown | ||
784 | QScopedPointer<Surface> surface(Test::createSurface()); | 772 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
785 | QFETCH(Test::XdgShellSurfaceType, type); | 773 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | 851 | { | |||
906 | QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>")); | 894 | QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>")); | ||
907 | } | 895 | } | ||
908 | 896 | | |||
909 | void TestXdgShellClient::testUnresponsiveWindow_data() | 897 | void TestXdgShellClient::testUnresponsiveWindow_data() | ||
910 | { | 898 | { | ||
911 | QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp | 899 | QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp | ||
912 | QTest::addColumn<bool>("socketMode"); | 900 | QTest::addColumn<bool>("socketMode"); | ||
913 | 901 | | |||
914 | QTest::newRow("xdgv6 display") << "xdg-shell-v6" << false; | 902 | QTest::newRow("xdg display") << "xdg-shell" << false; | ||
915 | QTest::newRow("xdgv6 socket") << "xdg-shell-v6" << true; | 903 | QTest::newRow("xdg socket") << "xdg-shell" << true; | ||
916 | | ||||
917 | //TODO add XDG WM Base when Kwin relies on Qt 5.12 | | |||
918 | } | 904 | } | ||
919 | 905 | | |||
920 | void TestXdgShellClient::testUnresponsiveWindow() | 906 | void TestXdgShellClient::testUnresponsiveWindow() | ||
921 | { | 907 | { | ||
922 | // this test verifies that killWindow properly terminates a process | 908 | // this test verifies that killWindow properly terminates a process | ||
923 | // for this an external binary is launched | 909 | // for this an external binary is launched | ||
924 | const QString kill = QFINDTESTDATA(QStringLiteral("kill")); | 910 | const QString kill = QFINDTESTDATA(QStringLiteral("kill")); | ||
925 | QVERIFY(!kill.isEmpty()); | 911 | QVERIFY(!kill.isEmpty()); | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
991 | auto elapsed2 = QDateTime::currentMSecsSinceEpoch() - startTime; | 977 | auto elapsed2 = QDateTime::currentMSecsSinceEpoch() - startTime; | ||
992 | QVERIFY(elapsed2 > 1800); //second ping comes in a second later | 978 | QVERIFY(elapsed2 > 1800); //second ping comes in a second later | ||
993 | } | 979 | } | ||
994 | 980 | | |||
995 | void TestXdgShellClient::testX11WindowId_data() | 981 | void TestXdgShellClient::testX11WindowId_data() | ||
996 | { | 982 | { | ||
997 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 983 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
998 | 984 | | |||
999 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
1000 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 985 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1001 | } | 986 | } | ||
1002 | 987 | | |||
1003 | void TestXdgShellClient::testX11WindowId() | 988 | void TestXdgShellClient::testX11WindowId() | ||
1004 | { | 989 | { | ||
1005 | QScopedPointer<Surface> surface(Test::createSurface()); | 990 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
1006 | QFETCH(Test::XdgShellSurfaceType, type); | 991 | QFETCH(Test::XdgShellSurfaceType, type); | ||
1007 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | 992 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | ||
Show All 22 Lines | 1000 | { | |||
1030 | 1015 | | |||
1031 | QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu")); | 1016 | QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu")); | ||
1032 | } | 1017 | } | ||
1033 | 1018 | | |||
1034 | void TestXdgShellClient::testNoDecorationModeRequested_data() | 1019 | void TestXdgShellClient::testNoDecorationModeRequested_data() | ||
1035 | { | 1020 | { | ||
1036 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 1021 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1037 | 1022 | | |||
1038 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
1039 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 1023 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1040 | } | 1024 | } | ||
1041 | 1025 | | |||
1042 | void TestXdgShellClient::testNoDecorationModeRequested() | 1026 | void TestXdgShellClient::testNoDecorationModeRequested() | ||
1043 | { | 1027 | { | ||
1044 | // this test verifies that the decoration follows the default mode if no mode is explicitly requested | 1028 | // this test verifies that the decoration follows the default mode if no mode is explicitly requested | ||
1045 | QScopedPointer<Surface> surface(Test::createSurface()); | 1029 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
1046 | QFETCH(Test::XdgShellSurfaceType, type); | 1030 | QFETCH(Test::XdgShellSurfaceType, type); | ||
Show All 11 Lines | |||||
1058 | QCOMPARE(c->noBorder(), false); | 1042 | QCOMPARE(c->noBorder(), false); | ||
1059 | QCOMPARE(c->isDecorated(), true); | 1043 | QCOMPARE(c->isDecorated(), true); | ||
1060 | } | 1044 | } | ||
1061 | 1045 | | |||
1062 | void TestXdgShellClient::testSendClientWithTransientToDesktop_data() | 1046 | void TestXdgShellClient::testSendClientWithTransientToDesktop_data() | ||
1063 | { | 1047 | { | ||
1064 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 1048 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1065 | 1049 | | |||
1066 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
1067 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 1050 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1068 | } | 1051 | } | ||
1069 | 1052 | | |||
1070 | void TestXdgShellClient::testSendClientWithTransientToDesktop() | 1053 | void TestXdgShellClient::testSendClientWithTransientToDesktop() | ||
1071 | { | 1054 | { | ||
1072 | // this test verifies that when sending a client to a desktop all transients are also send to that desktop | 1055 | // this test verifies that when sending a client to a desktop all transients are also send to that desktop | ||
1073 | 1056 | | |||
1074 | VirtualDesktopManager::self()->setCount(2); | 1057 | VirtualDesktopManager::self()->setCount(2); | ||
Show All 38 Lines | |||||
1113 | QCOMPARE(c->desktop(), 1); | 1096 | QCOMPARE(c->desktop(), 1); | ||
1114 | QCOMPARE(transient->desktop(), 1); | 1097 | QCOMPARE(transient->desktop(), 1); | ||
1115 | } | 1098 | } | ||
1116 | 1099 | | |||
1117 | void TestXdgShellClient::testMinimizeWindowWithTransients_data() | 1100 | void TestXdgShellClient::testMinimizeWindowWithTransients_data() | ||
1118 | { | 1101 | { | ||
1119 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 1102 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1120 | 1103 | | |||
1121 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | | |||
1122 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 1104 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1123 | } | 1105 | } | ||
1124 | 1106 | | |||
1125 | void TestXdgShellClient::testMinimizeWindowWithTransients() | 1107 | void TestXdgShellClient::testMinimizeWindowWithTransients() | ||
1126 | { | 1108 | { | ||
1127 | // this test verifies that when minimizing/unminimizing a window all its | 1109 | // this test verifies that when minimizing/unminimizing a window all its | ||
1128 | // transients will be minimized/unminimized as well | 1110 | // transients will be minimized/unminimized as well | ||
1129 | 1111 | | |||
▲ Show 20 Lines • Show All 514 Lines • Show Last 20 Lines |