@@ -110,6 +110,22 @@ Rectangle {
110 physicalOrientation180: Qt.LandscapeOrientation
110 physicalOrientation180: Qt.LandscapeOrientation
111 primaryOrientationAngle: 90
111 primaryOrientationAngle: 90
117+ target: orientedShellLoader
118+ width: units.gu(100)
119+ height: units.gu(56)
123+ physicalOrientation270: Qt.InvertedPortraitOrientation
124+ physicalOrientation0: Qt.LandscapeOrientation
125+ physicalOrientation90: Qt.PortraitOrientation
126+ physicalOrientation180: Qt.InvertedLandscapeOrientation
127+ primaryOrientationAngle: 0
@@ -250,7 +266,7 @@ Rectangle {
250 anchors { left: parent.left; right: parent.right }
266 anchors { left: parent.left; right: parent.right }
251 activeFocusOnPress: false
267 activeFocusOnPress: false
252 text: "Device Name"
268 text: "Device Name"
253− model: ["mako", "manta", "flo"]
269+ model: ["mako", "manta", "flo", "desktop"]
254 onSelectedIndexChanged: {
270 onSelectedIndexChanged: {
255 testCase.tearDown();
271 testCase.tearDown();
256 applicationArguments.deviceName = model[selectedIndex];
272 applicationArguments.deviceName = model[selectedIndex];
@@ -310,12 +326,14 @@ Rectangle {
312 text: "Add mouse"
328 text: "Add mouse"
329+ activeFocusOnPress: false
313 onClicked: {
330 onClicked: {
314 UnityInputInfo.inputInfo.addMockMouse()
331 UnityInputInfo.inputInfo.addMockMouse()
318 text: "Remove mouse"
335 text: "Remove mouse"
336+ activeFocusOnPress: false
319 onClicked: {
337 onClicked: {
320 UnityInputInfo.inputInfo.removeMockMouse()
338 UnityInputInfo.inputInfo.removeMockMouse()
@@ -324,17 +342,37 @@ Rectangle {
326 text: "Add kbd"
344 text: "Add kbd"
345+ activeFocusOnPress: false
327 onClicked: {
346 onClicked: {
328 UnityInputInfo.inputInfo.addMockKeyboard()
347 UnityInputInfo.inputInfo.addMockKeyboard()
351+ activeFocusOnPress: false
332 text: "Remove kbd"
352 text: "Remove kbd"
333 onClicked: {
353 onClicked: {
334 UnityInputInfo.inputInfo.removeMockKeyboard()
354 UnityInputInfo.inputInfo.removeMockKeyboard()
359+ // Simulates what happens when the shell is moved to an external monitor and back
361+ id: moveToFromMonitorButton
362+ text: applicationArguments.deviceName === "desktop" ? "Move to " + prevDevName + " screen" : "Move to desktop screen"
363+ activeFocusOnPress: false
364+ property string prevDevName: "mako"
366+ usageModeSelector.selectedIndex = 2; // "Automatic"
368+ if (applicationArguments.deviceName === "desktop") {
369+ applicationArguments.deviceName = prevDevName;
371+ prevDevName = applicationArguments.deviceName;
372+ applicationArguments.deviceName = "desktop"
@@ -1054,6 +1092,18 @@ Rectangle {
1054 compare(signalSpy.count, 0);
1092 compare(signalSpy.count, 0);
1095+ function test_moveToExternalMonitor() {
1098+ compare(orientedShell.orientation, Qt.InvertedLandscapeOrientation);
1099+ compare(shell.transformRotationAngle, 90);
1101+ moveToFromMonitorButton.clicked();
1103+ tryCompare(orientedShell, "orientation", Qt.LandscapeOrientation);
1104+ tryCompare(shell, "transformRotationAngle" , 0);
1057 // angle - rotation angle in degrees clockwise, relative to the primary orientation.
1107 // angle - rotation angle in degrees clockwise, relative to the primary orientation.
1058 function rotateTo(angle) {
1108 function rotateTo(angle) {
1059 switch (angle) {
1109 switch (angle) {