@@ -1142,6 +1142,26 @@ Rectangle {
11421142 orientedShellLoader.width = oldWidth;
11431143 }
11441144
1145+ function test_screenSizeChanges() {
1146+ loadShell("mako")
1147+ var shell = findChild(orientedShell, "shell");
1148+
1149+ tryCompare(shell, "usageScenario", "phone");
1150+
1151+ // make screen larger
1152+ orientedShellLoader.width = units.gu(90);
1153+ tryCompare(shell, "usageScenario", "phone");
1154+
1155+ // plug a mouse
1156+ MockInputDeviceBackend.addMockDevice("/mouse0", InputInfo.Mouse);
1157+ tryCompare(shell, "usageScenario", "desktop");
1158+
1159+ // make the screen smaller again, it should go back to staged even though there's still a mouse around
1160+ orientedShellLoader.width = units.gu(40);
1161+
1162+ tryCompare(shell, "usageScenario", "phone");
1163+ }
1164+
11451165 function test_overrideStaged() {
11461166 loadShell("mako")
11471167