@@ -2154,8 +2154,10 @@ Rectangle {
21542154
21552155 function test_switchToStagedForcesLegacyAppClosing_data() {
21562156 return [
2157− {tag: "forceClose", replug: false },
2158− {tag: "replug", replug: true }
2157+ {tag: "forceClose", replug: false, tabletMode: false, screenSize: Qt.size(units.gu(20), units.gu(40)) },
2158+ {tag: "replug", replug: true, tabletMode: false, screenSize: Qt.size(units.gu(20), units.gu(40)) },
2159+ {tag: "forceClose+tablet", replug: false, tabletMode: true, screenSize: Qt.size(units.gu(90), units.gu(65)) },
2160+ {tag: "replug+tablet", replug: true, tabletMode: true, screenSize: Qt.size(units.gu(90), units.gu(65)) }
21592161 ];
21602162 }
21612163
@@ -2164,6 +2166,11 @@ Rectangle {
21642166 shell.usageScenario = "desktop"
21652167 waitForRendering(shell);
21662168
2169+ // setup some screen size
2170+ var dialogs = findChild(root, "dialogs");
2171+ verify(dialogs);
2172+ dialogs.screenSize = data.screenSize;
2173+
21672174 ApplicationManager.startApplication("camera-app")
21682175
21692176 shell.usageScenario = "phone"
@@ -2182,14 +2189,13 @@ Rectangle {
21822189 shell.usageScenario = "phone"
21832190 waitForRendering(shell);
21842191
2185− // The popup must appear now
2192+ // The popup must appear now, unless in "tablet" mode
21862193 popup = findChild(root, "modeSwitchWarningDialog");
2187− compare(popup !== null, true);
2194+ compare(popup !== null, !data.tabletMode);
21882195
2189− if (data.replug) {
2196+ if (data.replug || data.tabletMode) {
21902197 shell.usageScenario = "desktop"
21912198 waitForRendering(shell);
2192−
21932199 } else {
21942200 var forceCloseButton = findChild(popup, "forceCloseButton");
21952201 mouseClick(forceCloseButton, forceCloseButton.width / 2, forceCloseButton.height / 2);
@@ -2200,7 +2206,7 @@ Rectangle {
22002206 popup = findChild(root, "modeSwitchWarningDialog");
22012207 tryCompareFunction(function() { return popup === null}, true);
22022208
2203− if (data.replug) {
2209+ if (data.replug || data.tabletMode) {
22042210 // Libreoffice must still be running
22052211 compare(ApplicationManager.findApplication("libreoffice") !== null, true);
22062212 } else {