on xenial help sign in
fix another test
4963440Michael Zanetti
qml/Stage/Stage.qml−5
@@ -530,8 +530,6 @@ AbstractStage {
530 }
530 }
531 }
531 }
532 z: normalZ
532 z: normalZ
533− onZChanged: print("app", model.application.appId, "z changed to:", z)
534−
535
533
536 // Normally we want x/y where we request it to be. Width/height of our delegate will
534 // Normally we want x/y where we request it to be. Width/height of our delegate will
537 // match what the actual surface size is.
535 // match what the actual surface size is.
@@ -878,9 +876,6 @@ AbstractStage {
878 targetScale: spreadMaths.targetScale
876 targetScale: spreadMaths.targetScale
879 }
877 }
880
878
881−// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
882−// onRequestedWidthChanged: if (index == 0) print("requestedWidth", requestedWidth)
883− onStateChanged: print("+++ App", model.application.appId, "state changed to:", state)
884 states: [
879 states: [
885 State {
880 State {
886 name: "spread"; when: root.state == "spread"
881 name: "spread"; when: root.state == "spread"
tests/qmltests/tst_Shell.qml+11−17
@@ -1658,47 +1658,41 @@ Rectangle {
1658 function test_altTabWrapAround() {
1658 function test_altTabWrapAround() {
1659 loadDesktopShellWithApps();
1659 loadDesktopShellWithApps();
1660
1660
1661− var desktopStage = findChild(shell, "stage");
1662− verify(desktopStage !== null)
1663−
1664− var desktopSpread = findChild(shell, "spread");
1661+ var stage = findChild(shell, "stage");
1665− verify(desktopSpread !== null)
1662+ verify(stage !== null)
1666−
1667− var spreadContainer = findInvisibleChild(shell, "spreadContainer")
1668− verify(spreadContainer !== null)
1669
1663
1670− var spreadRepeater = findInvisibleChild(shell, "spreadRepeater")
1664+ var spread = findChild(shell, "spreadItem");
1671− verify(spreadRepeater !== null)
1665+ verify(spread !== null)
1672
1666
1673 // remember the focused appId
1667 // remember the focused appId
1674 var focused = ApplicationManager.get(ApplicationManager.findApplication(ApplicationManager.focusedApplicationId));
1668 var focused = ApplicationManager.get(ApplicationManager.findApplication(ApplicationManager.focusedApplicationId));
1675
1669
1676− tryCompare(desktopSpread, "state", "")
1670+ tryCompare(stage, "state", "windowed")
1677
1671
1678 // Just press Alt, make sure the spread comes up
1672 // Just press Alt, make sure the spread comes up
1679 keyPress(Qt.Key_Alt);
1673 keyPress(Qt.Key_Alt);
1680 keyClick(Qt.Key_Tab);
1674 keyClick(Qt.Key_Tab);
1681− tryCompare(desktopSpread, "state", "altTab")
1675+ tryCompare(stage, "state", "spread")
1682− tryCompare(spreadRepeater, "highlightedIndex", 1)
1676+ tryCompare(spread, "highlightedIndex", 1)
1683 waitForRendering(shell)
1677 waitForRendering(shell)
1684
1678
1685 // Now press and hold Tab, make sure the highlight moves all the way but stops at the last one
1679 // Now press and hold Tab, make sure the highlight moves all the way but stops at the last one
1686 // We can't simulate a pressed key with keyPress() currently, so let's inject the events
1680 // We can't simulate a pressed key with keyPress() currently, so let's inject the events
1687 // at API level. Jump for 10 times, verify that it's still at the last one and didn't wrap around.
1681 // at API level. Jump for 10 times, verify that it's still at the last one and didn't wrap around.
1688 for (var i = 0; i < 10; i++) {
1682 for (var i = 0; i < 10; i++) {
1689− desktopSpread.selectNext(true); // true == isAutoRepeat
1683+ spread.selectNext(true); // true == isAutoRepeat
1690 wait(0); // Trigger the event loop to make sure all the things happen
1684 wait(0); // Trigger the event loop to make sure all the things happen
1691 }
1685 }
1692− tryCompare(spreadRepeater, "highlightedIndex", 6)
1686+ tryCompare(spread, "highlightedIndex", 6)
1693
1687
1694 // Now release it once, and verify that it does wrap around with an additional Tab press
1688 // Now release it once, and verify that it does wrap around with an additional Tab press
1695 keyRelease(Qt.Key_Tab);
1689 keyRelease(Qt.Key_Tab);
1696 keyClick(Qt.Key_Tab);
1690 keyClick(Qt.Key_Tab);
1697− tryCompare(spreadRepeater, "highlightedIndex", 0)
1691+ tryCompare(spread, "highlightedIndex", 0)
1698
1692
1699 // Release control, check if spread disappears
1693 // Release control, check if spread disappears
1700 keyRelease(Qt.Key_Alt)
1694 keyRelease(Qt.Key_Alt)
1701− tryCompare(desktopSpread, "state", "")
1695+ tryCompare(stage, "state", "windowed")
1702
1696
1703 // Make sure that after wrapping around once, we have the same one focused as at the beginning
1697 // Make sure that after wrapping around once, we have the same one focused as at the beginning
1704 var focusedAppSurface = focused.surfaceList.get(0);
1698 var focusedAppSurface = focused.surfaceList.get(0);