@@ -1857,15 +1857,21 @@ Rectangle {
18571857 loadShell(data.formFactor);
18581858 shell.usageScenario = data.usageScenario;
18591859
1860+ // Add two main stage apps, the second in order to suspend the first.
1861+ // LibreOffice has isTouchApp set to false by our mocks.
18601862 var app1 = ApplicationManager.startApplication("libreoffice");
18611863 waitUntilAppWindowIsFullyLoaded(app1);
18621864 var app2 = ApplicationManager.startApplication("gallery-app");
18631865 waitUntilAppWindowIsFullyLoaded(app2);
18641866
1867+ // Sanity checking
1868+ compare(app1.stage, ApplicationInfoInterface.MainStage);
1869+ compare(app2.stage, ApplicationInfoInterface.MainStage);
1870+ verify(!app1.isTouchApp);
1871+ verify(!app1.session.surface.activeFocus);
1872+
18651873 // Make sure app1 is exempt with a requested suspend
18661874 verify(app1.exemptFromLifecycle);
1867− verify(!app1.isTouchApp); // sanity check our mock, which sets this for us
1868− verify(!app1.session.surface.activeFocus);
18691875 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);
18701876 }
18711877
@@ -1882,14 +1888,19 @@ Rectangle {
18821888
18831889 GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
18841890
1891+ // Add two main stage apps, the second in order to suspend the first
18851892 var app1 = ApplicationManager.startApplication("webbrowser-app");
18861893 waitUntilAppWindowIsFullyLoaded(app1);
18871894 var app2 = ApplicationManager.startApplication("gallery-app");
18881895 waitUntilAppWindowIsFullyLoaded(app2);
18891896
1897+ // Sanity checking
1898+ compare(app1.stage, ApplicationInfoInterface.MainStage);
1899+ compare(app2.stage, ApplicationInfoInterface.MainStage);
1900+ verify(!app1.session.surface.activeFocus);
1901+
18901902 // Make sure app1 is exempt with a requested suspend
18911903 verify(app1.exemptFromLifecycle);
1892− verify(!app1.session.surface.activeFocus);
18931904 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);
18941905 }
18951906