@@ -26,6 +26,7 @@ import Unity.Application 0.1
26import Unity.Connectivity 0.1
26import Unity.Connectivity 0.1
27import Unity.Indicators 0.1
27import Unity.Indicators 0.1
28import Unity.Notifications 1.0
28import Unity.Notifications 1.0
29+import Unity.Launcher 0.1
29import Unity.Test 0.1
30import Unity.Test 0.1
30import Powerd 0.1
31import Powerd 0.1
31import Wizard 0.1 as Wizard
32import Wizard 0.1 as Wizard
@@ -49,11 +50,6 @@ Rectangle {
49 shellLoader.active = true;
50 shellLoader.active = true;
53− id: clickThroughCatcher
54− anchors.fill: shellContainer
58 id: shellContainer
54 id: shellContainer
59 anchors.left: root.left
55 anchors.left: root.left
@@ -121,10 +117,6 @@ Rectangle {
121 Component.onDestruction: {
117 Component.onDestruction: {
122 shellLoader.itemDestroyed = true;
118 shellLoader.itemDestroyed = true;
124− Component.onCompleted: {
125− var keyMapper = testCase.findChild(__shell, "physicalKeysMapper");
126− keyMapper.controlInsteadOfAlt = true;
@@ -213,6 +205,31 @@ Rectangle {
213 checked: true
205 checked: true
214 color: "white"
206 color: "white"
208+ ListItem.ItemSelector {
210+ anchors { left: parent.left; right: parent.right }
211+ activeFocusOnPress: false
213+ model: ["Ctrl", "Alt", "Super"]
214+ onSelectedIndexChanged: {
215+ var keyMapper = testCase.findChild(shellContainer, "physicalKeysMapper");
216+ keyMapper.controlInsteadOfAlt = selectedIndex == 1;
217+ keyMapper.controlInsteadOfSuper = selectedIndex == 2;
222+ anchors { left: parent.left; right: parent.right }
224+ id: autohideLauncherCheckbox
226+ GSettingsController.setAutohideLauncher(checked)
230+ text: "Autohide launcher"
217 Label { text: "Applications"; font.bold: true }
234 Label { text: "Applications"; font.bold: true }
@@ -296,12 +313,6 @@ Rectangle {
296 signalName: "applicationRemoved"
313 signalName: "applicationRemoved"
301− target: clickThroughCatcher
302− signalName: "clicked"
305 Telephony.CallEntry {
316 Telephony.CallEntry {
306 id: phoneCall
317 id: phoneCall
307 phoneNumber: "+447812221111"
318 phoneNumber: "+447812221111"
@@ -670,6 +681,7 @@ Rectangle {
670 function swipeAwayGreeter() {
681 function swipeAwayGreeter() {
671 var greeter = findChild(shell, "greeter");
682 var greeter = findChild(shell, "greeter");
672 tryCompare(greeter, "fullyShown", true);
683 tryCompare(greeter, "fullyShown", true);
684+ waitForGreeterToStabilize();
673 removeTimeConstraintsFromDirectionalDragAreas(greeter);
685 removeTimeConstraintsFromDirectionalDragAreas(greeter);
675 var touchX = shell.width - (shell.edgeSize / 2);
687 var touchX = shell.width - (shell.edgeSize / 2);
@@ -773,7 +785,7 @@ Rectangle {
773 loadShell("phone");
785 loadShell("phone");
774 swipeAwayGreeter();
786 swipeAwayGreeter();
775 var item = findChild(shell, "inputMethod");
787 var item = findChild(shell, "inputMethod");
776− var surface = SurfaceManager.inputMethodSurface();
788+ var surface = SurfaceManager.inputMethodSurface;
778 surface.setState(Mir.MinimizedState);
790 surface.setState(Mir.MinimizedState);
779 tryCompare(item, "visible", false);
791 tryCompare(item, "visible", false);
@@ -844,7 +856,6 @@ Rectangle {
844 function test_launchedAppHasActiveFocus(data) {
856 function test_launchedAppHasActiveFocus(data) {
845 loadShell(data.formFactor);
857 loadShell(data.formFactor);
846 shell.usageScenario = data.usageScenario;
858 shell.usageScenario = data.usageScenario;
847− waitForGreeterToStabilize();
848 swipeAwayGreeter();
859 swipeAwayGreeter();
850 var webApp = ApplicationManager.startApplication("webbrowser-app");
861 var webApp = ApplicationManager.startApplication("webbrowser-app");
@@ -912,6 +923,7 @@ Rectangle {
912 function dragLauncherIntoView() {
923 function dragLauncherIntoView() {
913 var launcher = findChild(shell, "launcher");
924 var launcher = findChild(shell, "launcher");
914 var launcherPanel = findChild(launcher, "launcherPanel");
925 var launcherPanel = findChild(launcher, "launcherPanel");
926+ waitForRendering(launcher);
915 verify(launcherPanel.x = - launcherPanel.width);
927 verify(launcherPanel.x = - launcherPanel.width);
917 var touchStartX = 2;
929 var touchStartX = 2;
@@ -1424,9 +1436,17 @@ Rectangle {
1424 tryCompare(galleryApp, "requestedState", ApplicationInfoInterface.RequestedRunning);
1436 tryCompare(galleryApp, "requestedState", ApplicationInfoInterface.RequestedRunning);
1439+ function test_altTabSwitchesFocus_data() {
1441+ { tag: "windowed", shellType: "desktop" },
1442+ { tag: "staged", shellType: "phone" },
1443+ { tag: "sidestaged", shellType: "tablet" }
1427− function test_altTabSwitchesFocus() {
1447+ function test_altTabSwitchesFocus(data) {
1428− loadShell("desktop");
1448+ loadShell(data.shellType);
1429− shell.usageScenario = "desktop"
1449+ shell.usageScenario = data.shellType;
1430 waitForRendering(root)
1450 waitForRendering(root)
1432 var desktopStage = findChild(shell, "stage");
1452 var desktopStage = findChild(shell, "stage");
@@ -1441,21 +1461,13 @@ Rectangle {
1442 // Do a quick alt-tab and see if focus changes
1462 // Do a quick alt-tab and see if focus changes
1443 tryCompare(app3.session.lastSurface, "activeFocus", true)
1463 tryCompare(app3.session.lastSurface, "activeFocus", true)
1444− keyClick(Qt.Key_Tab, Qt.ControlModifier)
1464+ keyClick(Qt.Key_Tab, Qt.AltModifier)
1445 tryCompare(app2.session.lastSurface, "activeFocus", true)
1465 tryCompare(app2.session.lastSurface, "activeFocus", true)
1447− var desktopSpread = findChild(shell, "spread")
1467+ // Press Alt+Tab
1449− tryCompare(desktopSpread, "state", "")
1451− // Just press Alt, make sure the spread comes up
1452− keyPress(Qt.Key_Control);
1468+ keyPress(Qt.Key_Alt);
1453 keyClick(Qt.Key_Tab);
1469 keyClick(Qt.Key_Tab);
1454− tryCompare(desktopSpread, "state", "altTab")
1456− // Release control, check if spread disappears
1457− keyRelease(Qt.Key_Control)
1470+ keyRelease(Qt.Key_Alt)
1458− tryCompare(desktopSpread, "state", "")
1460 // Focus should have switched back now
1472 // Focus should have switched back now
1461 tryCompare(app3.session.lastSurface, "activeFocus", true)
1473 tryCompare(app3.session.lastSurface, "activeFocus", true)
@@ -1482,7 +1494,7 @@ Rectangle {
1482 tryCompare(desktopSpread, "state", "")
1494 tryCompare(desktopSpread, "state", "")
1484 // Just press Alt, make sure the spread comes up
1496 // Just press Alt, make sure the spread comes up
1485− keyPress(Qt.Key_Control);
1497+ keyPress(Qt.Key_Alt);
1486 keyClick(Qt.Key_Tab);
1498 keyClick(Qt.Key_Tab);
1487 tryCompare(desktopSpread, "state", "altTab")
1499 tryCompare(desktopSpread, "state", "altTab")
1488 tryCompare(spreadRepeater, "highlightedIndex", 1)
1500 tryCompare(spreadRepeater, "highlightedIndex", 1)
@@ -1503,7 +1515,7 @@ Rectangle {
1503 tryCompare(spreadRepeater, "highlightedIndex", 0)
1515 tryCompare(spreadRepeater, "highlightedIndex", 0)
1505 // Release control, check if spread disappears
1517 // Release control, check if spread disappears
1506− keyRelease(Qt.Key_Control)
1518+ keyRelease(Qt.Key_Alt)
1507 tryCompare(desktopSpread, "state", "")
1519 tryCompare(desktopSpread, "state", "")
1509 // Make sure that after wrapping around once, we have the same one focused as at the beginning
1521 // Make sure that after wrapping around once, we have the same one focused as at the beginning
@@ -1516,7 +1528,7 @@ Rectangle {
1516 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1528 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1517 verify(spreadRepeater !== null);
1529 verify(spreadRepeater !== null);
1519− keyPress(Qt.Key_Control)
1531+ keyPress(Qt.Key_Alt)
1520 keyClick(Qt.Key_Tab);
1532 keyClick(Qt.Key_Tab);
1521 tryCompare(spreadRepeater, "highlightedIndex", 1);
1533 tryCompare(spreadRepeater, "highlightedIndex", 1);
@@ -1538,7 +1550,7 @@ Rectangle {
1538 keyClick(Qt.Key_Backtab);
1550 keyClick(Qt.Key_Backtab);
1539 tryCompare(spreadRepeater, "highlightedIndex", 1);
1551 tryCompare(spreadRepeater, "highlightedIndex", 1);
1541− keyRelease(Qt.Key_Control);
1553+ keyRelease(Qt.Key_Alt);
1544 function test_highlightFollowsMouse() {
1556 function test_highlightFollowsMouse() {
@@ -1547,7 +1559,7 @@ Rectangle {
1547 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1559 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1548 verify(spreadRepeater !== null);
1560 verify(spreadRepeater !== null);
1550− keyPress(Qt.Key_Control)
1562+ keyPress(Qt.Key_Alt)
1551 keyClick(Qt.Key_Tab);
1563 keyClick(Qt.Key_Tab);
1553 tryCompare(spreadRepeater, "highlightedIndex", 1);
1565 tryCompare(spreadRepeater, "highlightedIndex", 1);
@@ -1566,7 +1578,7 @@ Rectangle {
1567 verify(y < 4000);
1579 verify(y < 4000);
1569− keyRelease(Qt.Key_Control);
1581+ keyRelease(Qt.Key_Alt);
1572 function test_closeFromSpread() {
1584 function test_closeFromSpread() {
@@ -1575,7 +1587,7 @@ Rectangle {
1575 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1587 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1576 verify(spreadRepeater !== null);
1588 verify(spreadRepeater !== null);
1578− keyPress(Qt.Key_Control)
1590+ keyPress(Qt.Key_Alt)
1579 keyClick(Qt.Key_Tab);
1591 keyClick(Qt.Key_Tab);
1581 appRemovedSpy.clear();
1593 appRemovedSpy.clear();
@@ -1602,7 +1614,7 @@ Rectangle {
1602 tryCompare(appRemovedSpy, "count", 1)
1614 tryCompare(appRemovedSpy, "count", 1)
1603 compare(appRemovedSpy.signalArguments[0][0], closedAppId);
1615 compare(appRemovedSpy.signalArguments[0][0], closedAppId);
1605− keyRelease(Qt.Key_Control);
1617+ keyRelease(Qt.Key_Alt);
1608 function test_selectFromSpreadWithMouse_data() {
1620 function test_selectFromSpreadWithMouse_data() {
@@ -1622,7 +1634,7 @@ Rectangle {
1622 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1634 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
1623 verify(spreadRepeater !== null);
1635 verify(spreadRepeater !== null);
1625− keyPress(Qt.Key_Control)
1637+ keyPress(Qt.Key_Alt)
1626 keyClick(Qt.Key_Tab);
1638 keyClick(Qt.Key_Tab);
1628 var focusAppId = ApplicationManager.get(2).appId;
1640 var focusAppId = ApplicationManager.get(2).appId;
@@ -1649,7 +1661,7 @@ Rectangle {
1649 tryCompare(stage, "state", "");
1661 tryCompare(stage, "state", "");
1650 tryCompare(ApplicationManager, "focusedApplicationId", focusAppId);
1662 tryCompare(ApplicationManager, "focusedApplicationId", focusAppId);
1652− keyRelease(Qt.Key_Control);
1664+ keyRelease(Qt.Key_Alt);
1655 function test_progressiveAutoScrolling() {
1667 function test_progressiveAutoScrolling() {
@@ -1658,7 +1670,7 @@ Rectangle {
1658 var appRepeater = findInvisibleChild(shell, "appRepeater");
1670 var appRepeater = findInvisibleChild(shell, "appRepeater");
1659 verify(appRepeater !== null);
1671 verify(appRepeater !== null);
1661− keyPress(Qt.Key_Control)
1673+ keyPress(Qt.Key_Alt)
1662 keyClick(Qt.Key_Tab);
1674 keyClick(Qt.Key_Tab);
1664 var spreadFlickable = findChild(shell, "spreadFlickable")
1676 var spreadFlickable = findChild(shell, "spreadFlickable")
@@ -1669,7 +1681,7 @@ Rectangle {
1669 var x = 0;
1681 var x = 0;
1670 var y = shell.height * .5
1682 var y = shell.height * .5
1671 mouseMove(shell, x, y)
1683 mouseMove(shell, x, y)
1672− while (x <= spreadFlickable.width) {
1684+ while (x <= shell.width) {
1674 mouseMove(shell, x, y)
1686 mouseMove(shell, x, y)
1675 wait(0); // spin the loop so bindings get evaluated
1687 wait(0); // spin the loop so bindings get evaluated
@@ -1684,7 +1696,7 @@ Rectangle {
1685 tryCompare(spreadFlickable, "contentX", 0);
1697 tryCompare(spreadFlickable, "contentX", 0);
1687− keyRelease(Qt.Key_Control);
1699+ keyRelease(Qt.Key_Alt);
1690 // This makes sure the hoverMouseArea is set to invisible AND disabled
1702 // This makes sure the hoverMouseArea is set to invisible AND disabled
@@ -1696,13 +1708,13 @@ Rectangle {
1696 tryCompare(hoverMouseArea, "enabled", false)
1708 tryCompare(hoverMouseArea, "enabled", false)
1697 tryCompare(hoverMouseArea, "visible", false)
1709 tryCompare(hoverMouseArea, "visible", false)
1699− keyPress(Qt.Key_Control)
1711+ keyPress(Qt.Key_Alt)
1700 keyClick(Qt.Key_Tab);
1712 keyClick(Qt.Key_Tab);
1702 tryCompare(hoverMouseArea, "enabled", true)
1714 tryCompare(hoverMouseArea, "enabled", true)
1703 tryCompare(hoverMouseArea, "visible", true)
1715 tryCompare(hoverMouseArea, "visible", true)
1705− keyRelease(Qt.Key_Control)
1717+ keyRelease(Qt.Key_Alt)
1707 tryCompare(hoverMouseArea, "enabled", false)
1719 tryCompare(hoverMouseArea, "enabled", false)
1708 tryCompare(hoverMouseArea, "visible", false)
1720 tryCompare(hoverMouseArea, "visible", false)
@@ -1719,7 +1731,7 @@ Rectangle {
1719 var appRepeater = findInvisibleChild(shell, "appRepeater");
1731 var appRepeater = findInvisibleChild(shell, "appRepeater");
1720 verify(appRepeater !== null);
1732 verify(appRepeater !== null);
1722− keyPress(Qt.Key_Control)
1734+ keyPress(Qt.Key_Alt)
1723 keyClick(Qt.Key_Tab);
1735 keyClick(Qt.Key_Tab);
1725 tryCompare(spreadRepeater, "highlightedIndex", 1);
1737 tryCompare(spreadRepeater, "highlightedIndex", 1);
@@ -1740,33 +1752,46 @@ Rectangle {
1741 verify(y < 4000);
1753 verify(y < 4000);
1743− keyRelease(Qt.Key_Control);
1755+ keyRelease(Qt.Key_Alt);
1746− function test_focusAppFromLauncherExitsSpread() {
1758+ function test_focusAppFromLauncherExitsSpread_data() {
1747− loadDesktopShellWithApps()
1759+ return [
1760+ {tag: "autohide launcher", launcherLocked: false },
1761+ {tag: "locked launcher", launcherLocked: true }
1749− var desktopSpread = findChild(shell, "spread");
1765+ function test_focusAppFromLauncherExitsSpread(data) {
1766+ loadDesktopShellWithApps()
1750 var launcher = findChild(shell, "launcher");
1767 var launcher = findChild(shell, "launcher");
1768+ var desktopSpread = findChild(shell, "spread");
1751 var bfb = findChild(launcher, "buttonShowDashHome");
1769 var bfb = findChild(launcher, "buttonShowDashHome");
1771+ GSettingsController.setAutohideLauncher(!data.launcherLocked);
1772+ waitForRendering(shell);
1753− keyPress(Qt.Key_Control)
1774+ keyPress(Qt.Key_Alt)
1754 keyClick(Qt.Key_Tab);
1775 keyClick(Qt.Key_Tab);
1756 tryCompare(desktopSpread, "state", "altTab")
1777 tryCompare(desktopSpread, "state", "altTab")
1779+ if (!data.launcherLocked) {
1758− revealLauncherByEdgePushWithMouse();
1780+ revealLauncherByEdgePushWithMouse();
1759− tryCompare(launcher, "x", 0);
1781+ tryCompare(launcher, "x", 0);
1760− mouseMove(bfb, bfb.width / 2, bfb.height / 2)
1782+ mouseMove(bfb, bfb.width / 2, bfb.height / 2)
1761− waitForRendering(shell)
1783+ waitForRendering(shell)
1763 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1786 mouseClick(bfb, bfb.width / 2, bfb.height / 2)
1787+ if (!data.launcherLocked) {
1764− tryCompare(launcher, "state", "")
1788+ tryCompare(launcher, "state", "")
1765 tryCompare(desktopSpread, "state", "")
1790 tryCompare(desktopSpread, "state", "")
1767 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
1792 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash")
1769− keyRelease(Qt.Key_Control);
1794+ keyRelease(Qt.Key_Alt);
1772 // regression test for http://pad.lv/1443319
1797 // regression test for http://pad.lv/1443319
@@ -1854,6 +1879,31 @@ Rectangle {
1854 compare(appDelegate.y >= PanelState.panelHeight, true);
1879 compare(appDelegate.y >= PanelState.panelHeight, true);
1882+ function test_cantResizeWindowUnderPanel() {
1883+ loadShell("desktop");
1884+ shell.usageScenario = "desktop";
1885+ waitForRendering(shell);
1887+ var app = ApplicationManager.startApplication("dialer-app")
1888+ waitUntilAppWindowIsFullyLoaded(app);
1890+ var appContainer = findChild(shell, "appContainer");
1891+ var appDelegate = findChild(appContainer, "appDelegate_dialer-app");
1892+ var decoration = findChild(appDelegate, "appWindowDecoration_dialer-app");
1893+ verify(decoration);
1895+ // move it away from launcher and panel
1896+ appDelegate.x = units.gu(10)
1897+ appDelegate.y = units.gu(10)
1899+ // drag-resize the area up
1900+ mousePress(decoration, decoration.width/2, -units.gu(1));
1901+ mouseMove(decoration, decoration.width/2, -units.gu(100));
1903+ // verify we don't go past the panel
1904+ compare(appDelegate.y >= PanelState.panelHeight, true);
1857 function test_restoreWindowStateFixesIfUnderPanel() {
1907 function test_restoreWindowStateFixesIfUnderPanel() {
1858 loadDesktopShellWithApps();
1908 loadDesktopShellWithApps();
1859 var appRepeater = findChild(shell, "appRepeater")
1909 var appRepeater = findChild(shell, "appRepeater")
@@ -1989,6 +2039,138 @@ Rectangle {
2042+ function test_superTabToCycleLauncher_data() {
2044+ {tag: "autohide launcher", launcherLocked: false},
2045+ {tag: "locked launcher", launcherLocked: true}
2049+ function test_superTabToCycleLauncher(data) {
2050+ loadShell("desktop");
2051+ shell.usageScenario = "desktop";
2052+ GSettingsController.setAutohideLauncher(!data.launcherLocked);
2053+ waitForRendering(shell);
2055+ var launcher = findChild(shell, "launcher");
2056+ var launcherPanel = findChild(launcher, "launcherPanel");
2057+ var firstAppInLauncher = LauncherModel.get(0).appId;
2059+ compare(launcher.state, data.launcherLocked ? "visible": "");
2060+ compare(launcherPanel.highlightIndex, -2);
2061+ compare(ApplicationManager.focusedApplicationId, "unity8-dash");
2063+ // Use Super + Tab Tab to cycle to the first entry in the launcher
2064+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2065+ keyClick(Qt.Key_Tab);
2066+ tryCompare(launcher, "state", "visible");
2067+ tryCompare(launcherPanel, "highlightIndex", -1);
2068+ keyClick(Qt.Key_Tab);
2069+ tryCompare(launcherPanel, "highlightIndex", 0);
2070+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2071+ tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2072+ tryCompare(launcherPanel, "highlightIndex", -2);
2073+ tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
2075+ // Now go back to the dash
2076+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2077+ keyClick(Qt.Key_Tab);
2078+ tryCompare(launcher, "state", "visible");
2079+ tryCompare(launcherPanel, "highlightIndex", -1);
2080+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2081+ tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2082+ tryCompare(launcherPanel, "highlightIndex", -2);
2083+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
2086+ function test_longpressSuperOpensLauncher() {
2087+ loadShell("desktop");
2088+ var launcher = findChild(shell, "launcher");
2089+ var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
2091+ compare(launcher.state, "");
2092+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2093+ tryCompare(launcher, "state", "visible");
2094+ tryCompare(shortcutHint, "visible", true);
2096+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2097+ tryCompare(launcher, "state", "");
2098+ tryCompare(shortcutHint, "visible", false);
2101+ function test_metaNumberLaunchesFromLauncher_data() {
2103+ {tag: "Meta+1", key: Qt.Key_1, index: 0},
2104+ {tag: "Meta+2", key: Qt.Key_2, index: 1},
2105+ {tag: "Meta+4", key: Qt.Key_5, index: 4},
2106+ {tag: "Meta+0", key: Qt.Key_0, index: 9},
2110+ function test_metaNumberLaunchesFromLauncher(data) {
2111+ loadShell("desktop");
2112+ var launcher = findChild(shell, "launcher");
2113+ var appId = LauncherModel.get(data.index).appId;
2114+ waitForRendering(shell);
2116+ keyClick(data.key, Qt.MetaModifier);
2117+ tryCompare(ApplicationManager, "focusedApplicationId", appId);
2120+ function test_altF1OpensLauncherForKeyboardNavigation() {
2121+ loadShell("desktop");
2122+ waitForRendering(shell);
2123+ var launcher = findChild(shell, "launcher");
2125+ keyClick(Qt.Key_F1, Qt.AltModifier);
2126+ tryCompare(launcher, "state", "visible");
2127+ tryCompare(launcher, "focus", true)
2130+ function test_lockedOutLauncherAddsMarginsToMaximized() {
2131+ loadShell("desktop");
2132+ shell.usageScenario = "desktop";
2133+ waitForRendering(shell);
2134+ var appContainer = findChild(shell, "appContainer");
2135+ var launcher = findChild(shell, "launcher");
2137+ var app = ApplicationManager.startApplication("music-app");
2138+ waitUntilAppWindowIsFullyLoaded(app);
2139+ var appDelegate = findChild(appContainer, "appDelegate_music-app");
2140+ appDelegate.maximize();
2141+ tryCompare(appDelegate, "visuallyMaximized", true);
2142+ waitForRendering(shell);
2144+ GSettingsController.setAutohideLauncher(true);
2145+ waitForRendering(shell)
2146+ var hiddenSize = appDelegate.width;
2148+ GSettingsController.setAutohideLauncher(false);
2149+ waitForRendering(shell)
2150+ var shownSize = appDelegate.width;
2152+ compare(shownSize + launcher.panelWidth, hiddenSize);
2155+ function test_fullscreenAppHidesLockedOutLauncher() {
2156+ loadShell("desktop");
2157+ shell.usageScenario = "desktop";
2159+ var launcher = findChild(shell, "launcher");
2160+ var launcherPanel = findChild(launcher, "launcherPanel");
2162+ GSettingsController.setAutohideLauncher(false);
2163+ waitForRendering(shell)
2165+ tryCompare(launcher, "lockedVisible", true);
2167+ var cameraApp = ApplicationManager.startApplication("camera-app");
2168+ waitUntilAppWindowIsFullyLoaded(cameraApp);
2170+ tryCompare(launcher, "lockedVisible", false);
1992 function test_inputEventsOnEdgesEndUpInAppSurface_data() {
2174 function test_inputEventsOnEdgesEndUpInAppSurface_data() {
1993 return [
2175 return [
1994 { tag: "phone", repeaterName: "spreadRepeater" },
2176 { tag: "phone", repeaterName: "spreadRepeater" },