From c6a840413a6f842e66b02911ebfd00bb74b6752e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 13 Sep 2016 15:20:46 +0200 Subject: [PATCH] [autotest/integration] Extend the TabBox caps lock test to verify correct shortcut is triggered Capslock currently modifies the shortcut which is triggered from Alt+Tab to Alt+Shift+Tab. This shouldn't be and is not the case on X11. --- autotests/integration/tabbox_test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autotests/integration/tabbox_test.cpp b/autotests/integration/tabbox_test.cpp index 388afaaa8c..d1e5b98524 100644 --- a/autotests/integration/tabbox_test.cpp +++ b/autotests/integration/tabbox_test.cpp @@ -85,7 +85,7 @@ void TabBoxTest::testCapsLock() // this test verifies that Alt+tab works correctly also when Capslock is on // bug 368590 - // first create two windows + // first create three windows QScopedPointer surface1(Test::createSurface()); QScopedPointer shellSurface1(Test::createShellSurface(Test::ShellSurfaceType::WlShell, surface1.data())); auto c1 = Test::renderAndWaitForShown(surface1.data(), QSize(100, 50), Qt::blue); @@ -96,6 +96,11 @@ void TabBoxTest::testCapsLock() auto c2 = Test::renderAndWaitForShown(surface2.data(), QSize(100, 50), Qt::red); QVERIFY(c2); QVERIFY(c2->isActive()); + QScopedPointer surface3(Test::createSurface()); + QScopedPointer shellSurface3(Test::createShellSurface(Test::ShellSurfaceType::XdgShellV5, surface3.data())); + auto c3 = Test::renderAndWaitForShown(surface3.data(), QSize(100, 50), Qt::red); + QVERIFY(c3); + QVERIFY(c3->isActive()); // Setup tabbox signal spies QSignalSpy tabboxAddedSpy(TabBox::TabBox::self(), &TabBox::TabBox::tabBoxAdded); @@ -131,7 +136,11 @@ void TabBoxTest::testCapsLock() QCOMPARE(input()->keyboardModifiers(), Qt::NoModifier); QCOMPARE(tabboxClosedSpy.count(), 1); QCOMPARE(TabBox::TabBox::self()->isGrabbed(), false); + QEXPECT_FAIL("", "capslock modifies the shortcut to walk back", Continue); + QCOMPARE(workspace()->activeClient(), c2); + surface3.reset(); + QVERIFY(Test::waitForWindowDestroyed(c3)); surface2.reset(); QVERIFY(Test::waitForWindowDestroyed(c2)); surface1.reset();