@@ -26,6 +26,7 @@ import WindowManager 1.0
26import ".."
26import ".."
27import "../../../qml/Stage"
27import "../../../qml/Stage"
28import "../../../qml/Components"
28import "../../../qml/Components"
29+import "../../../qml/Components/PanelState"
30Rectangle {
31Rectangle {
@@ -57,6 +58,7 @@ Rectangle {
57 mode: "stagedWithSideStage"
58 mode: "stagedWithSideStage"
58 applicationManager: ApplicationManager
59 applicationManager: ApplicationManager
59 topLevelSurfaceList: root.topLevelSurfaceList
60 topLevelSurfaceList: root.topLevelSurfaceList
61+ panelState: PanelState {}
61 Component.onCompleted: {
63 Component.onCompleted: {
62 print("starting dash")
64 print("starting dash")
@@ -131,14 +133,15 @@ Rectangle {
131 name: "TabletStage"
133 name: "TabletStage"
132 when: windowShown
134 when: windowShown
134− readonly property alias topLevelSurfaceList: root.topLevelSurfaceList
135 property Item sideStage: stage ? findChild(stage, "sideStage") : null
136 property Item sideStage: stage ? findChild(stage, "sideStage") : null
137 function init() {
138 function init() {
138 stageSaver.clear();
139 stageSaver.clear();
141+ print("blllaaaaaaaaa")
140 ApplicationManager.startApplication("unity8-dash");
142 ApplicationManager.startApplication("unity8-dash");
141 tryCompare(topLevelSurfaceList, "count", 1);
143 tryCompare(topLevelSurfaceList, "count", 1);
144+ print("have", topLevelSurfaceList.count, "surfaces")
142 compare(topLevelSurfaceList.applicationAt(0).appId, "unity8-dash");
145 compare(topLevelSurfaceList.applicationAt(0).appId, "unity8-dash");
144 // this is very strange, but sometimes the test starts without
147 // this is very strange, but sometimes the test starts without
@@ -160,6 +163,8 @@ Rectangle {
160 waitUntilAppSurfaceShowsUp(topLevelSurfaceList.idAt(0));
163 waitUntilAppSurfaceShowsUp(topLevelSurfaceList.idAt(0));
161 sideStage.hideNow()
164 sideStage.hideNow()
162 tryCompare(sideStage, "x", stage.width)
165 tryCompare(sideStage, "x", stage.width)
166+ print("still have", topLevelSurfaceList.count, "surfaces")
165 function cleanup() {
170 function cleanup() {
@@ -221,7 +226,7 @@ Rectangle {
221 tryCompare(stage, "state", "spread");
226 tryCompare(stage, "state", "spread");
224− function swipeSurfaceUpwards(surfaceId) {
229+ function swipeSurfaceDownwards(surfaceId) {
225 var appWindow = findAppWindowForSurfaceId(surfaceId);
230 var appWindow = findAppWindowForSurfaceId(surfaceId);
226 verify(appWindow);
231 verify(appWindow);
@@ -229,7 +234,7 @@ Rectangle {
229 // to not be covered by other surfaces when they're all being shown in the spread
234 // to not be covered by other surfaces when they're all being shown in the spread
230 touchFlick(appWindow,
235 touchFlick(appWindow,
231 appWindow.width * 0.1, appWindow.height / 2,
236 appWindow.width * 0.1, appWindow.height / 2,
232− appWindow.width * 0.1, -appWindow.height / 2);
237+ appWindow.width * 0.1, appWindow.height * 1.5);
235 function dragToSideStage(surfaceId) {
240 function dragToSideStage(surfaceId) {
@@ -327,7 +332,7 @@ Rectangle {
327 compare(appDelegate.stage, ApplicationInfoInterface.SideStage);
332 compare(appDelegate.stage, ApplicationInfoInterface.SideStage);
328 tryCompare(dragArea, "closeable", true);
333 tryCompare(dragArea, "closeable", true);
330− swipeSurfaceUpwards(dialerSurfaceId);
335+ swipeSurfaceDownwards(dialerSurfaceId);
332 // Check that dialer-app has been closed
337 // Check that dialer-app has been closed
@@ -338,6 +343,8 @@ Rectangle {
338 tryCompareFunction(function() {
343 tryCompareFunction(function() {
339 return ApplicationManager.findApplication(dialerCheckBox.appId);
344 return ApplicationManager.findApplication(dialerCheckBox.appId);
340 }, null);
345 }, null);
347+ stage.closeSpread();
343 function test_suspendsAndResumesAppsInMainStage() {
350 function test_suspendsAndResumesAppsInMainStage() {
@@ -655,10 +662,6 @@ Rectangle {
655 // simulate the suspended app being killed by the out-of-memory daemon
662 // simulate the suspended app being killed by the out-of-memory daemon
656 webbrowserApp.surfaceList.get(0).setLive(false);
663 webbrowserApp.surfaceList.get(0).setLive(false);
658− // wait until the surface is gone
659− tryCompare(webbrowserApp.surfaceList, "count", 0);
660− compare(topLevelSurfaceList.surfaceAt(topLevelSurfaceList.indexForId(webbrowserSurfaceId)), null);
662 switchToSurface(webbrowserSurfaceId);
665 switchToSurface(webbrowserSurfaceId);
664 // webbrowser should have been brought to front
667 // webbrowser should have been brought to front