@@ -392,7 +392,7 @@ Rectangle {
392392 compare(ApplicationManager.count, 1)
393393 }
394394
395− function test_snapDecisionDismissalReturnsFocus() {
395+ function atest_snapDecisionDismissalReturnsFocus() {
396396 loadShell("phone");
397397 swipeAwayGreeter();
398398 var notifications = findChild(shell, "notificationList");
@@ -453,7 +453,7 @@ Rectangle {
453453 mockNotificationsModel.append(n)
454454 }
455455
456− function test_phoneLeftEdgeDrag_data() {
456+ function atest_phoneLeftEdgeDrag_data() {
457457 return [
458458 {tag: "without launcher",
459459 revealLauncher: false, swipeLength: units.gu(30), appHides: true, focusedApp: "dialer-app",
@@ -485,7 +485,7 @@ Rectangle {
485485 ];
486486 }
487487
488− function test_phoneLeftEdgeDrag(data) {
488+ function atest_phoneLeftEdgeDrag(data) {
489489 loadShell("phone");
490490 swipeAwayGreeter();
491491 dragLauncherIntoView();
@@ -520,7 +520,7 @@ Rectangle {
520520 compare(animateTimer.nextState, "visible");
521521 }
522522
523− function test_tabletLeftEdgeDrag_data() {
523+ function atest_tabletLeftEdgeDrag_data() {
524524 return [
525525 {tag: "without password", user: "no-password", loggedIn: true, demo: false},
526526 {tag: "with password", user: "has-password", loggedIn: false, demo: false},
@@ -528,7 +528,7 @@ Rectangle {
528528 ]
529529 }
530530
531− function test_tabletLeftEdgeDrag(data) {
531+ function atest_tabletLeftEdgeDrag(data) {
532532 setLightDMMockMode("full");
533533 loadShell("tablet");
534534
@@ -543,7 +543,7 @@ Rectangle {
543543 confirmLoggedIn(data.loggedIn)
544544 }
545545
546− function test_longLeftEdgeSwipeTakesToAppsAndResetSearchString() {
546+ function atest_longLeftEdgeSwipeTakesToAppsAndResetSearchString() {
547547 loadShell("phone");
548548 swipeAwayGreeter();
549549 dragLauncherIntoView();
@@ -562,7 +562,7 @@ Rectangle {
562562 compare(dashCommunicatorSpy.count, 1);
563563 }
564564
565− function test_ClickUbuntuIconInLauncherTakesToAppsAndResetSearchString() {
565+ function atest_ClickUbuntuIconInLauncherTakesToAppsAndResetSearchString() {
566566 loadShell("phone");
567567 swipeAwayGreeter();
568568 dragLauncherIntoView();
@@ -578,7 +578,7 @@ Rectangle {
578578 compare(dashCommunicatorSpy.count, 1);
579579 }
580580
581− function test_suspend() {
581+ function atest_suspend() {
582582 loadShell("phone");
583583 swipeAwayGreeter();
584584 var greeter = findChild(shell, "greeter");
@@ -704,7 +704,7 @@ Rectangle {
704704 - perform long left edge swipe to go minimize the app and go back to the dash.
705705 - verify the setCurrentScope() D-Bus call to the dash has been called for the correct scope id.
706706 */
707− function test_minimizingAppTakesToDashApps() {
707+ function atest_minimizingAppTakesToDashApps() {
708708 loadShell("phone");
709709 swipeAwayGreeter();
710710 dragLauncherIntoView();
@@ -726,7 +726,7 @@ Rectangle {
726726 compare(dashCommunicatorSpy.signalArguments[0][0], 0);
727727 }
728728
729− function test_showInputMethod() {
729+ function atest_showInputMethod() {
730730 loadShell("phone");
731731 swipeAwayGreeter();
732732 var item = findChild(shell, "inputMethod");
@@ -757,7 +757,7 @@ Rectangle {
757757 waitUntilTransitionsEnd(appWindowStateGroup);
758758 }
759759
760− function test_surfaceLosesActiveFocusWhilePanelIsOpen() {
760+ function atest_surfaceLosesActiveFocusWhilePanelIsOpen() {
761761 loadShell("phone");
762762 swipeAwayGreeter();
763763 var app = ApplicationManager.startApplication("dialer-app");
@@ -790,7 +790,7 @@ Rectangle {
790790 tryCompare(app.session.surface, "activeFocus", true);
791791 }
792792
793− function test_launchedAppHasActiveFocus_data() {
793+ function atest_launchedAppHasActiveFocus_data() {
794794 return [
795795 {tag: "phone", formFactor: "phone", usageScenario: "phone"},
796796 {tag: "tablet", formFactor: "tablet", usageScenario: "tablet"},
@@ -798,7 +798,7 @@ Rectangle {
798798 ]
799799 }
800800
801− function test_launchedAppHasActiveFocus(data) {
801+ function atest_launchedAppHasActiveFocus(data) {
802802 loadShell(data.formFactor);
803803 shell.usageScenario = data.usageScenario;
804804 waitForGreeterToStabilize();
@@ -813,7 +813,7 @@ Rectangle {
813813 tryCompare(webApp.session.surface, "activeFocus", true);
814814 }
815815
816− function test_launchedAppKeepsActiveFocusOnUsageModeChange() {
816+ function atest_launchedAppKeepsActiveFocusOnUsageModeChange() {
817817 loadShell("tablet");
818818 swipeAwayGreeter();
819819
@@ -941,7 +941,7 @@ Rectangle {
941941 removeTimeConstraintsFromDirectionalDragAreas(greeter);
942942 }
943943
944− function test_focusRequestedHidesGreeter() {
944+ function atest_focusRequestedHidesGreeter() {
945945 loadShell("phone");
946946 swipeAwayGreeter();
947947 var greeter = findChild(shell, "greeter");
@@ -963,7 +963,7 @@ Rectangle {
963963 waitForRendering(greeter);
964964 }
965965
966− function test_focusRequestedHidesIndicators() {
966+ function atest_focusRequestedHidesIndicators() {
967967 loadShell("phone");
968968 swipeAwayGreeter();
969969 var indicators = findChild(shell, "indicators");
@@ -977,7 +977,7 @@ Rectangle {
977977 tryCompare(indicators, "fullyClosed", true);
978978 }
979979
980− function test_showAndHideGreeterDBusCalls() {
980+ function atest_showAndHideGreeterDBusCalls() {
981981 loadShell("phone");
982982 swipeAwayGreeter();
983983 var greeter = findChild(shell, "greeter")
@@ -990,7 +990,7 @@ Rectangle {
990990 tryCompare(greeter, "shown", false)
991991 }
992992
993− function test_greeterLoginsAutomaticallyWhenNoPasswordSet() {
993+ function atest_greeterLoginsAutomaticallyWhenNoPasswordSet() {
994994 loadShell("phone");
995995 swipeAwayGreeter();
996996
@@ -1002,7 +1002,7 @@ Rectangle {
10021002 tryCompare(sessionSpy, "count", 1);
10031003 }
10041004
1005− function test_fullscreen() {
1005+ function atest_fullscreen() {
10061006 loadShell("phone");
10071007 swipeAwayGreeter();
10081008 var panel = findChild(shell, "panel");
@@ -1017,7 +1017,7 @@ Rectangle {
10171017 tryCompare(panel, "fullscreenMode", false);
10181018 }
10191019
1020− function test_leftEdgeDragFullscreen() {
1020+ function atest_leftEdgeDragFullscreen() {
10211021 loadShell("phone");
10221022 swipeAwayGreeter();
10231023 var panel = findChild(shell, "panel");
@@ -1040,7 +1040,7 @@ Rectangle {
10401040 touchRelease(shell);
10411041 }
10421042
1043− function test_unlockedProperties() {
1043+ function atest_unlockedProperties() {
10441044 loadShell("phone");
10451045 swipeAwayGreeter();
10461046 // Confirm that various properties have the correct values when unlocked
@@ -1054,13 +1054,13 @@ Rectangle {
10541054 tryCompare(indicators, "available", true)
10551055 }
10561056
1057− function test_unlockAllModemsOnBoot() {
1057+ function atest_unlockAllModemsOnBoot() {
10581058 loadShell("phone");
10591059 swipeAwayGreeter();
10601060 tryCompare(unlockAllModemsSpy, "count", 1)
10611061 }
10621062
1063− function test_unlockAllModemsAfterWizard() {
1063+ function atest_unlockAllModemsAfterWizard() {
10641064 Wizard.System.wizardEnabled = true;
10651065 loadShell("phone");
10661066
@@ -1075,7 +1075,7 @@ Rectangle {
10751075 compare(unlockAllModemsSpy.count, 1);
10761076 }
10771077
1078− function test_wizardEarlyExit() {
1078+ function atest_wizardEarlyExit() {
10791079 Wizard.System.wizardEnabled = true;
10801080 AccountsService.demoEdges = true;
10811081 loadShell("phone");
@@ -1111,7 +1111,7 @@ Rectangle {
11111111 compare(tutorialLeft, null); // should be destroyed with tutorial
11121112 }
11131113
1114− function test_tutorialPausedDuringGreeter() {
1114+ function atest_tutorialPausedDuringGreeter() {
11151115 loadShell("phone");
11161116
11171117 var tutorial = findChild(shell, "tutorial");
@@ -1124,7 +1124,7 @@ Rectangle {
11241124 tryCompare(tutorial, "paused", false);
11251125 }
11261126
1127− function test_tapOnRightEdgeReachesApplicationSurface() {
1127+ function atest_tapOnRightEdgeReachesApplicationSurface() {
11281128 loadShell("phone");
11291129 swipeAwayGreeter();
11301130 var topmostSpreadDelegate = findChild(shell, "appDelegate0");
@@ -1153,7 +1153,7 @@ Rectangle {
11531153 that no touch event was sent to it (ie, they were all consumed
11541154 by the right-edge drag area)
11551155 */
1156− function test_rightEdgeDragDoesNotReachApplicationSurface() {
1156+ function atest_rightEdgeDragDoesNotReachApplicationSurface() {
11571157 loadShell("phone");
11581158 swipeAwayGreeter();
11591159 var topmostSpreadDelegate = findChild(shell, "appDelegate0");
@@ -1199,7 +1199,7 @@ Rectangle {
11991199 tryCompare(spreadView, "phase", 2);
12001200 }
12011201
1202− function test_tapUbuntuIconInLauncherOverAppSpread() {
1202+ function atest_tapUbuntuIconInLauncherOverAppSpread() {
12031203 launcherShowDashHomeSpy.clear();
12041204
12051205 loadShell("phone");
@@ -1245,7 +1245,7 @@ Rectangle {
12451245 tryCompare(launcherPanel, "x", -launcherPanel.width);
12461246 }
12471247
1248− function test_tabletLogin_data() {
1248+ function atest_tabletLogin_data() {
12491249 return [
12501250 {tag: "auth error", user: "auth-error", loggedIn: false, password: ""},
12511251 {tag: "with password", user: "has-password", loggedIn: true, password: "password"},
@@ -1253,7 +1253,7 @@ Rectangle {
12531253 ]
12541254 }
12551255
1256− function test_tabletLogin(data) {
1256+ function atest_tabletLogin(data) {
12571257 setLightDMMockMode("full");
12581258 loadShell("tablet");
12591259
@@ -1269,7 +1269,7 @@ Rectangle {
12691269 confirmLoggedIn(data.loggedIn);
12701270 }
12711271
1272− function test_appLaunchDuringGreeter_data() {
1272+ function atest_appLaunchDuringGreeter_data() {
12731273 return [
12741274 {tag: "auth error", user: "auth-error", loggedIn: false, passwordFocus: false},
12751275 {tag: "without password", user: "no-password", loggedIn: true, passwordFocus: false},
@@ -1277,7 +1277,7 @@ Rectangle {
12771277 ]
12781278 }
12791279
1280− function test_appLaunchDuringGreeter(data) {
1280+ function atest_appLaunchDuringGreeter(data) {
12811281 setLightDMMockMode("full");
12821282 loadShell("tablet");
12831283
@@ -1294,7 +1294,7 @@ Rectangle {
12941294 }
12951295 }
12961296
1297− function test_stageLoader_data() {
1297+ function atest_stageLoader_data() {
12981298 return [
12991299 {tag: "phone", source: "Stages/PhoneStage.qml", formFactor: "phone", usageScenario: "phone"},
13001300 {tag: "tablet", source: "Stages/TabletStage.qml", formFactor: "tablet", usageScenario: "tablet"},
@@ -1302,14 +1302,14 @@ Rectangle {
13021302 ]
13031303 }
13041304
1305− function test_stageLoader(data) {
1305+ function atest_stageLoader(data) {
13061306 loadShell(data.formFactor);
13071307 shell.usageScenario = data.usageScenario;
13081308 var stageLoader = findChild(shell, "applicationsDisplayLoader");
13091309 verify(String(stageLoader.source).indexOf(data.source) >= 0);
13101310 }
13111311
1312− function test_launcherInverted_data() {
1312+ function atest_launcherInverted_data() {
13131313 return [
13141314 {tag: "phone", formFactor: "phone", usageScenario: "phone", launcherInverted: true},
13151315 {tag: "tablet", formFactor: "tablet", usageScenario: "tablet", launcherInverted: true},
@@ -1317,7 +1317,7 @@ Rectangle {
13171317 ]
13181318 }
13191319
1320− function test_launcherInverted(data) {
1320+ function atest_launcherInverted(data) {
13211321 loadShell(data.formFactor);
13221322 shell.usageScenario = data.usageScenario;
13231323
@@ -1325,7 +1325,7 @@ Rectangle {
13251325 compare(launcher.inverted, data.launcherInverted);
13261326 }
13271327
1328− function test_unfocusedAppsGetSuspendedAfterEnteringStagedMode() {
1328+ function atest_unfocusedAppsGetSuspendedAfterEnteringStagedMode() {
13291329 loadShell("tablet");
13301330 shell.usageScenario = "desktop";
13311331
@@ -1347,7 +1347,7 @@ Rectangle {
13471347 tryCompare(galleryApp, "requestedState", ApplicationInfoInterface.RequestedSuspended);
13481348 }
13491349
1350− function test_unfocusedAppsAreResumedWhenEnteringWindowedMode() {
1350+ function atest_unfocusedAppsAreResumedWhenEnteringWindowedMode() {
13511351 loadShell("tablet");
13521352 shell.usageScenario = "tablet";
13531353
@@ -1369,7 +1369,7 @@ Rectangle {
13691369 tryCompare(galleryApp, "requestedState", ApplicationInfoInterface.RequestedRunning);
13701370 }
13711371
1372− function test_altTabSwitchesFocus() {
1372+ function atest_altTabSwitchesFocus() {
13731373 loadShell("desktop");
13741374 shell.usageScenario = "desktop"
13751375 waitForRendering(root)
@@ -1406,7 +1406,7 @@ Rectangle {
14061406 tryCompare(app3.session.surface, "activeFocus", true)
14071407 }
14081408
1409− function test_altTabWrapAround() {
1409+ function atest_altTabWrapAround() {
14101410 loadDesktopShellWithApps();
14111411
14121412 var desktopStage = findChild(shell, "stage");
@@ -1455,7 +1455,7 @@ Rectangle {
14551455 tryCompare(focused.session.surface, "activeFocus", true)
14561456 }
14571457
1458− function test_altBackTabNavigation() {
1458+ function atest_altBackTabNavigation() {
14591459 loadDesktopShellWithApps();
14601460
14611461 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
@@ -1486,7 +1486,7 @@ Rectangle {
14861486 keyRelease(Qt.Key_Control);
14871487 }
14881488
1489− function test_highlightFollowsMouse() {
1489+ function atest_highlightFollowsMouse() {
14901490 loadDesktopShellWithApps()
14911491
14921492 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
@@ -1514,7 +1514,7 @@ Rectangle {
15141514 keyRelease(Qt.Key_Control);
15151515 }
15161516
1517− function test_closeFromSpread() {
1517+ function atest_closeFromSpread() {
15181518 loadDesktopShellWithApps()
15191519
15201520 var spreadRepeater = findInvisibleChild(shell, "spreadRepeater");
@@ -1550,14 +1550,14 @@ Rectangle {
15501550 keyRelease(Qt.Key_Control);
15511551 }
15521552
1553− function test_selectFromSpreadWithMouse_data() {
1553+ function atest_selectFromSpreadWithMouse_data() {
15541554 return [
15551555 {tag: "click on tileInfo", tileInfo: true },
15561556 {tag: "click on surface", tileInfo: false },
15571557 ]
15581558 }
15591559
1560− function test_selectFromSpreadWithMouse(data) {
1560+ function atest_selectFromSpreadWithMouse(data) {
15611561 loadDesktopShellWithApps()
15621562
15631563 var stage = findChild(shell, "stage");
@@ -1597,7 +1597,7 @@ Rectangle {
15971597 keyRelease(Qt.Key_Control);
15981598 }
15991599
1600− function test_progressiveAutoScrolling() {
1600+ function atest_progressiveAutoScrolling() {
16011601 loadDesktopShellWithApps()
16021602
16031603 var appRepeater = findInvisibleChild(shell, "appRepeater");
@@ -1634,7 +1634,7 @@ Rectangle {
16341634
16351635 // This makes sure the hoverMouseArea is set to invisible AND disabled
16361636 // when not needed. Otherwise it'll eat mouse hover events for the rest of the shell/apps
1637− function test_hoverMouseAreaDisabledAndInvisible() {
1637+ function atest_hoverMouseAreaDisabledAndInvisible() {
16381638 loadDesktopShellWithApps()
16391639
16401640 var hoverMouseArea = findChild(shell, "hoverMouseArea");
@@ -1653,7 +1653,7 @@ Rectangle {
16531653 tryCompare(hoverMouseArea, "visible", false)
16541654 }
16551655
1656− function test_workspacePreviewsHighlightedApp() {
1656+ function atest_workspacePreviewsHighlightedApp() {
16571657 loadDesktopShellWithApps()
16581658
16591659 var targetZ = ApplicationManager.count + 1;
@@ -1688,7 +1688,7 @@ Rectangle {
16881688 keyRelease(Qt.Key_Control);
16891689 }
16901690
1691− function test_focusAppFromLauncherExitsSpread() {
1691+ function atest_focusAppFromLauncherExitsSpread() {
16921692 loadDesktopShellWithApps()
16931693
16941694 var desktopSpread = findChild(shell, "spread");
@@ -1714,7 +1714,7 @@ Rectangle {
17141714 }
17151715
17161716 // regression test for http://pad.lv/1443319
1717− function test_closeMaximizedAndRestart() {
1717+ function atest_closeMaximizedAndRestart() {
17181718 loadDesktopShellWithApps();
17191719
17201720 var appRepeater = findChild(shell, "appRepeater")
@@ -1739,7 +1739,7 @@ Rectangle {
17391739 }
17401740
17411741 // bug http://pad.lv/1431566
1742− function test_switchToStagedHidesPanelButtons() {
1742+ function atest_switchToStagedHidesPanelButtons() {
17431743 loadDesktopShellWithApps();
17441744 var appRepeater = findChild(shell, "appRepeater")
17451745 var appId = ApplicationManager.get(0).appId;
@@ -1761,7 +1761,7 @@ Rectangle {
17611761 tryCompare(panelButtons, "visible", true);
17621762 }
17631763
1764− function test_lockingGreeterHidesPanelButtons() {
1764+ function atest_lockingGreeterHidesPanelButtons() {
17651765 loadDesktopShellWithApps();
17661766 var appRepeater = findChild(shell, "appRepeater")
17671767 var appId = ApplicationManager.get(0).appId;
@@ -1783,39 +1783,49 @@ Rectangle {
17831783 tryCompare(panelButtons, "visible", true);
17841784 }
17851785
1786− function test_lifecyclePolicy_data() {
1786+ function test_lifecyclePolicyForNonTouchApp_data() {
17871787 return [
1788− {tag: "phone", formFactor: "phone", usageScenario: "phone", suspendsApps: true},
1789− {tag: "tablet", formFactor: "tablet", usageScenario: "tablet", suspendsApps: true},
1790− {tag: "desktop", formFactor: "tablet", usageScenario: "desktop", suspendsApps: false}
1788+ {tag: "phone", formFactor: "phone", usageScenario: "phone"},
1789+ {tag: "tablet", formFactor: "tablet", usageScenario: "tablet"}
17911790 ]
17921791 }
17931792
1794− function test_lifecyclePolicy(data) {
1793+ function test_lifecyclePolicyForNonTouchApp(data) {
17951794 loadShell(data.formFactor);
17961795 shell.usageScenario = data.usageScenario;
17971796
1798− GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
1799−
1800− var app1 = ApplicationManager.startApplication("camera-app");
1797+ var app1 = ApplicationManager.startApplication("libreoffice");
18011798 waitUntilAppWindowIsFullyLoaded(app1);
1802− var app2 = ApplicationManager.startApplication("webbrowser-app");
1799+ var app2 = ApplicationManager.startApplication("dialer-app");
18031800 waitUntilAppWindowIsFullyLoaded(app2);
1804− var app3 = ApplicationManager.startApplication("libreoffice");
1805− waitUntilAppWindowIsFullyLoaded(app3);
1806− var app4 = ApplicationManager.startApplication("dialer-app");
1807− waitUntilAppWindowIsFullyLoaded(app4);
18081801
1809− compare(app1.requestedState, data.suspendsApps ?
1810− ApplicationInfoInterface.RequestedSuspended :
1811− ApplicationInfoInterface.RequestedRunning);
1802+ // Make sure app1 is unfocused but still running
1803+ compare(app1.session.surface.activeFocus, false);
1804+ compare(app1.isTouchApp, false); // sanity check our mock, which sets this for us
1805+ compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);
1806+ }
18121807
1813− compare(app2.requestedState, ApplicationInfoInterface.RequestedRunning);
1808+ function test_lifecyclePolicyExemption_data() {
1809+ return [
1810+ {tag: "phone", formFactor: "phone", usageScenario: "phone", suspendsApps: true},
1811+ {tag: "tablet", formFactor: "tablet", usageScenario: "tablet", suspendsApps: true}
1812+ ]
1813+ }
1814+
1815+ function test_lifecyclePolicyExemption(data) {
1816+ loadShell(data.formFactor);
1817+ shell.usageScenario = data.usageScenario;
18141818
1815− compare(app3.isTouchApp, false); // sanity check our mock, which sets this for us
1816− compare(app3.requestedState, ApplicationInfoInterface.RequestedRunning);
1819+ GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
1820+
1821+ var app1 = ApplicationManager.startApplication("webbrowser-app");
1822+ waitUntilAppWindowIsFullyLoaded(app1);
1823+ var app2 = ApplicationManager.startApplication("dialer-app");
1824+ waitUntilAppWindowIsFullyLoaded(app2);
18171825
1818− compare(app4.requestedState, ApplicationInfoInterface.RequestedRunning);
1826+ // Make sure app1 is unfocused but still running
1827+ compare(app1.session.surface.activeFocus, false);
1828+ compare(app1.requestedState, ApplicationInfoInterface.RequestedRunning);
18191829 }
18201830
18211831 function test_switchToStagedForcesLegacyAppClosing_data() {