Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shell_client_test.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | |||||
151 | { | 151 | { | ||
152 | Test::destroyWaylandConnection(); | 152 | Test::destroyWaylandConnection(); | ||
153 | } | 153 | } | ||
154 | 154 | | |||
155 | void TestShellClient::testMapUnmapMap_data() | 155 | void TestShellClient::testMapUnmapMap_data() | ||
156 | { | 156 | { | ||
157 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 157 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
158 | 158 | | |||
159 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
160 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 159 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
161 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 160 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
162 | } | 161 | } | ||
163 | 162 | | |||
164 | void TestShellClient::testMapUnmapMap() | 163 | void TestShellClient::testMapUnmapMap() | ||
165 | { | 164 | { | ||
166 | // this test verifies that mapping a previously mapped window works correctly | 165 | // this test verifies that mapping a previously mapped window works correctly | ||
167 | QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | 166 | QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded); | ||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Line(s) | 295 | { | |||
328 | QVERIFY(windowShownSpy.wait()); | 327 | QVERIFY(windowShownSpy.wait()); | ||
329 | QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40))); | 328 | QCOMPARE(transient->geometry(), QRect(c->geometry().topLeft() + QPoint(5, 10), QSize(50, 40))); | ||
330 | } | 329 | } | ||
331 | 330 | | |||
332 | void TestShellClient::testWindowOutputs_data() | 331 | void TestShellClient::testWindowOutputs_data() | ||
333 | { | 332 | { | ||
334 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 333 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
335 | 334 | | |||
336 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
337 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 335 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
338 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 336 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
339 | } | 337 | } | ||
340 | 338 | | |||
341 | void TestShellClient::testWindowOutputs() | 339 | void TestShellClient::testWindowOutputs() | ||
342 | { | 340 | { | ||
343 | QScopedPointer<Surface> surface(Test::createSurface()); | 341 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
344 | QFETCH(Test::XdgShellSurfaceType, type); | 342 | QFETCH(Test::XdgShellSurfaceType, type); | ||
Show All 30 Lines | |||||
375 | QCOMPARE(surface->outputs().count(), 1); | 373 | QCOMPARE(surface->outputs().count(), 1); | ||
376 | QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); | 374 | QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280,0)); | ||
377 | } | 375 | } | ||
378 | 376 | | |||
379 | void TestShellClient::testMinimizeActiveWindow_data() | 377 | void TestShellClient::testMinimizeActiveWindow_data() | ||
380 | { | 378 | { | ||
381 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 379 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
382 | 380 | | |||
383 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
384 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 381 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
385 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 382 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
386 | } | 383 | } | ||
387 | 384 | | |||
388 | void TestShellClient::testMinimizeActiveWindow() | 385 | void TestShellClient::testMinimizeActiveWindow() | ||
389 | { | 386 | { | ||
390 | // this test verifies that when minimizing the active window it gets deactivated | 387 | // this test verifies that when minimizing the active window it gets deactivated | ||
391 | QScopedPointer<Surface> surface(Test::createSurface()); | 388 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
Show All 25 Lines | |||||
417 | QCOMPARE(workspace()->activeClient(), c); | 414 | QCOMPARE(workspace()->activeClient(), c); | ||
418 | } | 415 | } | ||
419 | 416 | | |||
420 | void TestShellClient::testFullscreen_data() | 417 | void TestShellClient::testFullscreen_data() | ||
421 | { | 418 | { | ||
422 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 419 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
423 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | 420 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||
424 | 421 | | |||
425 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client; | | |||
426 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | 422 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | ||
427 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | 423 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | ||
428 | 424 | | |||
429 | QTest::newRow("xdgShellV5 - deco") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server; | | |||
430 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | 425 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | ||
431 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | 426 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | ||
432 | } | 427 | } | ||
433 | 428 | | |||
434 | void TestShellClient::testFullscreen() | 429 | void TestShellClient::testFullscreen() | ||
435 | { | 430 | { | ||
436 | // this test verifies that a window can be properly fullscreened | 431 | // this test verifies that a window can be properly fullscreened | ||
437 | QScopedPointer<Surface> surface(Test::createSurface()); | 432 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
496 | QCOMPARE(c->layer(), NormalLayer); | 491 | QCOMPARE(c->layer(), NormalLayer); | ||
497 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 492 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
498 | } | 493 | } | ||
499 | 494 | | |||
500 | void TestShellClient::testFullscreenRestore_data() | 495 | void TestShellClient::testFullscreenRestore_data() | ||
501 | { | 496 | { | ||
502 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 497 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
503 | 498 | | |||
504 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
505 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 499 | 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 TestShellClient::testFullscreenRestore() | 503 | void TestShellClient::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()); | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
558 | QVERIFY(!c->isFullScreen()); | 552 | QVERIFY(!c->isFullScreen()); | ||
559 | QCOMPARE(c->geometry().size(), QSize(100, 50)); | 553 | QCOMPARE(c->geometry().size(), QSize(100, 50)); | ||
560 | } | 554 | } | ||
561 | 555 | | |||
562 | void TestShellClient::testUserCanSetFullscreen_data() | 556 | void TestShellClient::testUserCanSetFullscreen_data() | ||
563 | { | 557 | { | ||
564 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 558 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
565 | 559 | | |||
566 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
567 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 560 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
568 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 561 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
569 | } | 562 | } | ||
570 | 563 | | |||
571 | void TestShellClient::testUserCanSetFullscreen() | 564 | void TestShellClient::testUserCanSetFullscreen() | ||
572 | { | 565 | { | ||
573 | QScopedPointer<Surface> surface(Test::createSurface()); | 566 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
574 | QFETCH(Test::XdgShellSurfaceType, type); | 567 | QFETCH(Test::XdgShellSurfaceType, type); | ||
575 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | 568 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellSurface(type, surface.data())); | ||
576 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | 569 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | ||
577 | QVERIFY(c); | 570 | QVERIFY(c); | ||
578 | QVERIFY(c->isActive()); | 571 | QVERIFY(c->isActive()); | ||
579 | QVERIFY(!c->isFullScreen()); | 572 | QVERIFY(!c->isFullScreen()); | ||
580 | QVERIFY(c->userCanSetFullScreen()); | 573 | QVERIFY(c->userCanSetFullScreen()); | ||
581 | } | 574 | } | ||
582 | 575 | | |||
583 | void TestShellClient::testUserSetFullscreen_data() | 576 | void TestShellClient::testUserSetFullscreen_data() | ||
584 | { | 577 | { | ||
585 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 578 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
586 | 579 | | |||
587 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
588 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 580 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
589 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 581 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
590 | } | 582 | } | ||
591 | 583 | | |||
592 | void TestShellClient::testUserSetFullscreen() | 584 | void TestShellClient::testUserSetFullscreen() | ||
593 | { | 585 | { | ||
594 | QScopedPointer<Surface> surface(Test::createSurface()); | 586 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
595 | QFETCH(Test::XdgShellSurfaceType, type); | 587 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
643 | QVERIFY(!c->isFullScreen()); | 635 | QVERIFY(!c->isFullScreen()); | ||
644 | } | 636 | } | ||
645 | 637 | | |||
646 | void TestShellClient::testMaximizedToFullscreen_data() | 638 | void TestShellClient::testMaximizedToFullscreen_data() | ||
647 | { | 639 | { | ||
648 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 640 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
649 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | 641 | QTest::addColumn<ServerSideDecoration::Mode>("decoMode"); | ||
650 | 642 | | |||
651 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Client; | | |||
652 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | 643 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Client; | ||
653 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | 644 | QTest::newRow("xdgShellWmBase") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Client; | ||
654 | 645 | | |||
655 | QTest::newRow("xdgShellV5 - deco") << Test::XdgShellSurfaceType::XdgShellV5 << ServerSideDecoration::Mode::Server; | | |||
656 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | 646 | QTest::newRow("xdgShellV6 - deco") << Test::XdgShellSurfaceType::XdgShellV6 << ServerSideDecoration::Mode::Server; | ||
657 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | 647 | QTest::newRow("xdgShellWmBase - deco") << Test::XdgShellSurfaceType::XdgShellStable << ServerSideDecoration::Mode::Server; | ||
658 | } | 648 | } | ||
659 | 649 | | |||
660 | void TestShellClient::testMaximizedToFullscreen() | 650 | void TestShellClient::testMaximizedToFullscreen() | ||
661 | { | 651 | { | ||
662 | // this test verifies that a window can be properly fullscreened after maximizing | 652 | // this test verifies that a window can be properly fullscreened after maximizing | ||
663 | QScopedPointer<Surface> surface(Test::createSurface()); | 653 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
737 | QVERIFY(!c->isFullScreen()); | 727 | QVERIFY(!c->isFullScreen()); | ||
738 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | 728 | QCOMPARE(c->isDecorated(), decoMode == ServerSideDecoration::Mode::Server); | ||
739 | } | 729 | } | ||
740 | 730 | | |||
741 | void TestShellClient::testWindowOpensLargerThanScreen_data() | 731 | void TestShellClient::testWindowOpensLargerThanScreen_data() | ||
742 | { | 732 | { | ||
743 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 733 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
744 | 734 | | |||
745 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
746 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 735 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
747 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 736 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
748 | } | 737 | } | ||
749 | 738 | | |||
750 | void TestShellClient::testWindowOpensLargerThanScreen() | 739 | void TestShellClient::testWindowOpensLargerThanScreen() | ||
751 | { | 740 | { | ||
752 | // this test creates a window which is as large as the screen, but is decorated | 741 | // this test creates a window which is as large as the screen, but is decorated | ||
753 | // the window should get resized to fit into the screen, BUG: 366632 | 742 | // the window should get resized to fit into the screen, BUG: 366632 | ||
Show All 20 Lines | |||||
774 | QEXPECT_FAIL("", "BUG 366632", Continue); | 763 | QEXPECT_FAIL("", "BUG 366632", Continue); | ||
775 | QVERIFY(sizeChangeRequestedSpy.wait(10)); | 764 | QVERIFY(sizeChangeRequestedSpy.wait(10)); | ||
776 | } | 765 | } | ||
777 | 766 | | |||
778 | void TestShellClient::testHidden_data() | 767 | void TestShellClient::testHidden_data() | ||
779 | { | 768 | { | ||
780 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 769 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
781 | 770 | | |||
782 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
783 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 771 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
784 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 772 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
785 | } | 773 | } | ||
786 | 774 | | |||
787 | void TestShellClient::testHidden() | 775 | void TestShellClient::testHidden() | ||
788 | { | 776 | { | ||
789 | // this test verifies that when hiding window it doesn't get shown | 777 | // this test verifies that when hiding window it doesn't get shown | ||
790 | QScopedPointer<Surface> surface(Test::createSurface()); | 778 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 857 | { | |||
912 | QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>")); | 900 | QCOMPARE(c4->captionSuffix(), QStringLiteral(" <4>")); | ||
913 | } | 901 | } | ||
914 | 902 | | |||
915 | void TestShellClient::testUnresponsiveWindow_data() | 903 | void TestShellClient::testUnresponsiveWindow_data() | ||
916 | { | 904 | { | ||
917 | QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp | 905 | QTest::addColumn<QString>("shellInterface");//see env selection in qwaylandintegration.cpp | ||
918 | QTest::addColumn<bool>("socketMode"); | 906 | QTest::addColumn<bool>("socketMode"); | ||
919 | 907 | | |||
920 | //wl-shell ping is not implemented | | |||
921 | //QTest::newRow("wl-shell display") << "wl-shell" << false; | | |||
922 | //QTest::newRow("wl-shell socket") << "wl-shell" << true; | | |||
923 | QTest::newRow("xdgv5 display") << "xdg-shell-v5" << false; | | |||
924 | QTest::newRow("xdgv5 socket") << "xdg-shell-v5" << true; | | |||
925 | QTest::newRow("xdgv6 display") << "xdg-shell-v6" << false; | 908 | QTest::newRow("xdgv6 display") << "xdg-shell-v6" << false; | ||
926 | QTest::newRow("xdgv6 socket") << "xdg-shell-v6" << true; | 909 | QTest::newRow("xdgv6 socket") << "xdg-shell-v6" << true; | ||
927 | 910 | | |||
928 | //TODO add XDG WM Base when Kwin relies on Qt 5.12 | 911 | //TODO add XDG WM Base when Kwin relies on Qt 5.12 | ||
929 | } | 912 | } | ||
930 | 913 | | |||
931 | void TestShellClient::testUnresponsiveWindow() | 914 | void TestShellClient::testUnresponsiveWindow() | ||
932 | { | 915 | { | ||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | |||||
1002 | auto elapsed2 = QDateTime::currentMSecsSinceEpoch() - startTime; | 985 | auto elapsed2 = QDateTime::currentMSecsSinceEpoch() - startTime; | ||
1003 | QVERIFY(elapsed2 > 1800); //second ping comes in a second later | 986 | QVERIFY(elapsed2 > 1800); //second ping comes in a second later | ||
1004 | } | 987 | } | ||
1005 | 988 | | |||
1006 | void TestShellClient::testX11WindowId_data() | 989 | void TestShellClient::testX11WindowId_data() | ||
1007 | { | 990 | { | ||
1008 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 991 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1009 | 992 | | |||
1010 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
1011 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 993 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
1012 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 994 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1013 | } | 995 | } | ||
1014 | 996 | | |||
1015 | void TestShellClient::testX11WindowId() | 997 | void TestShellClient::testX11WindowId() | ||
1016 | { | 998 | { | ||
1017 | QScopedPointer<Surface> surface(Test::createSurface()); | 999 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
1018 | QFETCH(Test::XdgShellSurfaceType, type); | 1000 | QFETCH(Test::XdgShellSurfaceType, type); | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 1037 | { | |||
1070 | QCOMPARE(c->noBorder(), false); | 1052 | QCOMPARE(c->noBorder(), false); | ||
1071 | QCOMPARE(c->isDecorated(), true); | 1053 | QCOMPARE(c->isDecorated(), true); | ||
1072 | } | 1054 | } | ||
1073 | 1055 | | |||
1074 | void TestShellClient::testSendClientWithTransientToDesktop_data() | 1056 | void TestShellClient::testSendClientWithTransientToDesktop_data() | ||
1075 | { | 1057 | { | ||
1076 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 1058 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1077 | 1059 | | |||
1078 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
1079 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 1060 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
1080 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 1061 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1081 | } | 1062 | } | ||
1082 | 1063 | | |||
1083 | void TestShellClient::testSendClientWithTransientToDesktop() | 1064 | void TestShellClient::testSendClientWithTransientToDesktop() | ||
1084 | { | 1065 | { | ||
1085 | // this test verifies that when sending a client to a desktop all transients are also send to that desktop | 1066 | // this test verifies that when sending a client to a desktop all transients are also send to that desktop | ||
1086 | 1067 | | |||
Show All 39 Lines | |||||
1126 | QCOMPARE(c->desktop(), 1); | 1107 | QCOMPARE(c->desktop(), 1); | ||
1127 | QCOMPARE(transient->desktop(), 1); | 1108 | QCOMPARE(transient->desktop(), 1); | ||
1128 | } | 1109 | } | ||
1129 | 1110 | | |||
1130 | void TestShellClient::testMinimizeWindowWithTransients_data() | 1111 | void TestShellClient::testMinimizeWindowWithTransients_data() | ||
1131 | { | 1112 | { | ||
1132 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | 1113 | QTest::addColumn<Test::XdgShellSurfaceType>("type"); | ||
1133 | 1114 | | |||
1134 | QTest::newRow("xdgShellV5") << Test::XdgShellSurfaceType::XdgShellV5; | | |||
1135 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | 1115 | QTest::newRow("xdgShellV6") << Test::XdgShellSurfaceType::XdgShellV6; | ||
1136 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | 1116 | QTest::newRow("xdgWmBase") << Test::XdgShellSurfaceType::XdgShellStable; | ||
1137 | } | 1117 | } | ||
1138 | 1118 | | |||
1139 | void TestShellClient::testMinimizeWindowWithTransients() | 1119 | void TestShellClient::testMinimizeWindowWithTransients() | ||
1140 | { | 1120 | { | ||
1141 | // this test verifies that when minimizing/unminimizing a window all its | 1121 | // this test verifies that when minimizing/unminimizing a window all its | ||
1142 | // transients will be minimized/unminimized as well | 1122 | // transients will be minimized/unminimized as well | ||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |