@@ -1857,15 +1857,21 @@ Rectangle {
1857 loadShell(data.formFactor);
1857 loadShell(data.formFactor);
1858 shell.usageScenario = data.usageScenario;
1858 shell.usageScenario = data.usageScenario;
1860+ // Add two main stage apps, the second in order to suspend the first.
1861+ // LibreOffice has isTouchApp set to false by our mocks.
1860 var app1 = ApplicationManager.startApplication("libreoffice");
1862 var app1 = ApplicationManager.startApplication("libreoffice");
1861 waitUntilAppWindowIsFullyLoaded(app1);
1863 waitUntilAppWindowIsFullyLoaded(app1);
1862 var app2 = ApplicationManager.startApplication("gallery-app");
1864 var app2 = ApplicationManager.startApplication("gallery-app");
1863 waitUntilAppWindowIsFullyLoaded(app2);
1865 waitUntilAppWindowIsFullyLoaded(app2);
1868+ compare(app1.stage, ApplicationInfoInterface.MainStage);
1869+ compare(app2.stage, ApplicationInfoInterface.MainStage);
1870+ verify(!app1.isTouchApp);
1871+ verify(!app1.session.surface.activeFocus);
1865 // Make sure app1 is exempt with a requested suspend
1873 // Make sure app1 is exempt with a requested suspend
1866 verify(app1.exemptFromLifecycle);
1874 verify(app1.exemptFromLifecycle);
1867− verify(!app1.isTouchApp); // sanity check our mock, which sets this for us
1868− verify(!app1.session.surface.activeFocus);
1869 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);
1875 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);
@@ -1882,14 +1888,19 @@ Rectangle {
1883 GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
1889 GSettingsController.setLifecycleExemptAppids(["webbrowser-app"]);
1891+ // Add two main stage apps, the second in order to suspend the first
1885 var app1 = ApplicationManager.startApplication("webbrowser-app");
1892 var app1 = ApplicationManager.startApplication("webbrowser-app");
1886 waitUntilAppWindowIsFullyLoaded(app1);
1893 waitUntilAppWindowIsFullyLoaded(app1);
1887 var app2 = ApplicationManager.startApplication("gallery-app");
1894 var app2 = ApplicationManager.startApplication("gallery-app");
1888 waitUntilAppWindowIsFullyLoaded(app2);
1895 waitUntilAppWindowIsFullyLoaded(app2);
1898+ compare(app1.stage, ApplicationInfoInterface.MainStage);
1899+ compare(app2.stage, ApplicationInfoInterface.MainStage);
1900+ verify(!app1.session.surface.activeFocus);
1890 // Make sure app1 is exempt with a requested suspend
1902 // Make sure app1 is exempt with a requested suspend
1891 verify(app1.exemptFromLifecycle);
1903 verify(app1.exemptFromLifecycle);
1892− verify(!app1.session.surface.activeFocus);
1893 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);
1904 compare(app1.requestedState, ApplicationInfoInterface.RequestedSuspended);