on xenial help sign in
add a test
commitdb85a6928b1796d08f414694a696fd5f4f4ae856 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 29 Mar 2017, 13:03 (10 years ago) parent7998c8d
1 file changed+32
tests/qmltests/tst_Shell.qml+32
tests/qmltests/tst_Shell.qml+32
@@ -3151,6 +3151,38 @@ Rectangle {
31513151 tryCompare(menuBarLoader.item, "visible", true);
31523152 }
31533153
3154+ function test_enforceFocusOnStageOnAltTab() {
3155+ loadShell("desktop");
3156+ shell.usageScenario = "desktop";
3157+ waitForRendering(shell);
3158+ swipeAwayGreeter();
3159+
3160+ var appDelegate = startApplication("music-app")
3161+ verify(appDelegate);
3162+ waitForRendering(shell);
3163+
3164+ var launcher = findChild(shell, "launcher");
3165+ launcher.focus = true;
3166+
3167+ var stage = findChild(shell, "stage");
3168+
3169+ var spreadItem = findChild(shell, "spreadItem");
3170+
3171+ compare(spreadItem.highlightedIndex, -1);
3172+
3173+ keyPress(Qt.Key_Alt);
3174+ keyClick(Qt.Key_Tab);
3175+
3176+ tryCompare(spreadItem, "highlightedIndex", 1);
3177+ tryCompare(stage, "focus", true);
3178+
3179+ keyClick(Qt.Key_Tab);
3180+
3181+ tryCompare(spreadItem, "highlightedIndex", 0);
3182+
3183+ keyRelease(Qt.Key_Alt);
3184+ }
3185+
31543186 function test_maximizedWindowAndMenuInPanel() {
31553187 loadShell("desktop");
31563188 shell.usageScenario = "desktop";