on xenial help sign in
fix parts of phonestage tests, not complete yet
commit0b077f254396bafa759b99831d0fb317ab417d2d authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 15 Sep 2016, 11:05 (10 years ago) parent8dc1286
2 files changed+105−201
qml/Stage/Stage.qml+5−3 tests/qmltests/Stage/tst_PhoneStage.qml+100−198
qml/Stage/Stage.qml+5−3
@@ -1480,12 +1480,14 @@ AbstractStage {
14801480 }
14811481 onClose: {
14821482 priv.closingIndex = index
1483− model.surface.close()
1483+ if (model.surface) { // could be stopped by OOM
1484+ model.surface.close()
1485+ } else if (model.application) {
1486+ root.applicationManager.stopApplication(model.application.appId);
1487+ }
14841488 }
14851489 }
14861490
1487−// Rectangle { anchors.fill: parent; color: "blue"; opacity: .4 }
1488−
14891491 WindowInfoItem {
14901492 id: windowInfoItem
14911493 objectName: "windowInfoItem"
tests/qmltests/Stage/tst_PhoneStage.qml+100−198
@@ -32,7 +32,7 @@ Item {
3232 property var greeter: { fullyShown: true }
3333
3434 Stage {
35− id: phoneStage
35+ id: stage
3636 anchors { fill: parent; rightMargin: units.gu(30) }
3737 focus: true
3838 dragAreaWidth: units.gu(2)
@@ -67,9 +67,9 @@ Item {
6767 id: edgeBarrierControls
6868 text: "Drag here to pull out spread"
6969 backgroundColor: "blue"
70− onDragged: { phoneStage.pushRightEdge(amount); }
70+ onDragged: { stage.pushRightEdge(amount); }
7171 Component.onCompleted: {
72− edgeBarrierControls.target = testCase.findChild(phoneStage, "edgeBarrierController");
72+ edgeBarrierControls.target = testCase.findChild(stage, "edgeBarrierController");
7373 }
7474 }
7575 Repeater {
@@ -85,11 +85,37 @@ Item {
8585 name: "PhoneStage"
8686 when: windowShown
8787
88+ function init() {
89+ // wait until unity8-dash is up and running.
90+ // it's started automatically by ApplicationManager mock implementation
91+ tryCompare(ApplicationManager, "count", 1);
92+ var dashApp = ApplicationManager.findApplication("unity8-dash");
93+ verify(dashApp);
94+ tryCompare(dashApp, "state", ApplicationInfoInterface.Running);
95+ }
96+
97+ function cleanup() {
98+ ApplicationManager.requestFocusApplication("unity8-dash");
99+ tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
100+ tryCompare(stage, "state", "staged");
101+ waitForRendering(stage);
102+
103+ killApps();
104+ // wait for Stage to stabilize back into its initial state
105+ var appRepeater = findChild(stage, "appRepeater");
106+ tryCompare(appRepeater, "count", 1);
107+ tryCompare(appRepeater.itemAt(0), "x", 0);
108+
109+ stage.shellOrientationAngle = 0;
110+
111+ waitForRendering(stage)
112+ }
113+
88114 function findAppWindowForSurfaceId(surfaceId) {
89115 var delegateObjectName = "appDelegate_" + surfaceId;
90− var spreadDelegate = findChild(phoneStage, delegateObjectName);
116+ var spreadDelegate = findChild(stage, delegateObjectName);
91117 if (!spreadDelegate) {
92− console.warn("Failed to find " + delegateObjectName + " in phoneStage ("+phoneStage+")");
118+ console.warn("Failed to find " + delegateObjectName + " in stage");
93119 return null;
94120 }
95121 var appWindow = findChild(spreadDelegate, "appWindow");
@@ -109,31 +135,29 @@ Item {
109135 function addApps(count) {
110136 if (count == undefined) count = 1;
111137 for (var i = 0; i < count; i++) {
138+ var startingAppId = ApplicationManager.availableApplications[ApplicationManager.count];
112139 var appSurfaceId = topLevelSurfaceList.nextId;
113− var app = ApplicationManager.startApplication(ApplicationManager.availableApplications[ApplicationManager.count])
140+ var app = ApplicationManager.startApplication(startingAppId)
114141 tryCompare(app, "state", ApplicationInfoInterface.Running)
115142 waitUntilAppSurfaceShowsUp(appSurfaceId);
116− waitForRendering(phoneStage)
143+ waitForRendering(stage)
144+ tryCompare(ApplicationManager, "focusedApplicationId", startingAppId)
117145 }
118146 }
119147
120148 function performEdgeSwipeToShowAppSpread() {
121− var spreadView = findChild(phoneStage, "spreadView");
122−
123− // Keep it inside the PhoneStage otherwise the controls on the right side will
149+ // Keep it inside the Stage otherwise the controls on the right side will
124150 // capture the press thus the "- 2" on startX.
125− var startX = phoneStage.width - 2;
126− var startY = phoneStage.height / 2;
151+ var startX = stage.width - 2;
152+ var startY = stage.height / 2;
127153 var endY = startY;
128− var endX = phoneStage.width / 2;
154+ var endX = stage.width / 2;
129155
130− touchFlick(phoneStage, startX, startY, endX, endY,
156+ touchFlick(stage, startX, startY, endX, endY,
131157 true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
132158
133− tryCompare(spreadView, "phase", 2);
134− tryCompare(spreadView, "flicking", false);
135− tryCompare(spreadView, "moving", false);
136− waitForRendering(phoneStage);
159+ tryCompare(stage, "state", "spread");
160+ waitForRendering(stage);
137161 }
138162
139163 function swipeSurfaceUpwards(surfaceId) {
@@ -162,7 +186,7 @@ Item {
162186
163187 function waitUntilAppDelegateStopsMoving(targetSurfaceId)
164188 {
165− var targetAppDelegate = findChild(phoneStage, "spreadDelegate_" + targetSurfaceId);
189+ var targetAppDelegate = findChild(stage, "appDelegate_" + targetSurfaceId);
166190 verify(targetAppDelegate);
167191 var lastValue = undefined;
168192 do {
@@ -171,79 +195,40 @@ Item {
171195 } while (lastValue != targetAppDelegate.animatedProgress);
172196 }
173197
174− function test_shortFlick() {
175− addApps(2)
176− var startX = phoneStage.width - units.gu(1);
177− var startY = phoneStage.height / 2;
178− var endX = startX - units.gu(4);
179− var endY = startY;
180−
181− var activeApp = ApplicationManager.get(0);
182− var inactiveApp = ApplicationManager.get(1);
183−
184− touchFlick(phoneStage, startX, startY, endX, endY,
185− true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
186−
187− tryCompare(ApplicationManager, "focusedApplicationId", inactiveApp.appId)
188−
189− touchFlick(phoneStage, startX, startY, endX, endY,
190− true /* beginTouch */, true /* endTouch */, units.gu(10), 50);
191−
192− tryCompare(ApplicationManager, "focusedApplicationId", activeApp.appId)
193− }
194−
195198 function test_enterSpread_data() {
196199 return [
197− {tag: "<position1 (linear movement)", positionMarker: "positionMarker1", linear: true, offset: 0, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
198− {tag: "<position1 (non-linear movement)", positionMarker: "positionMarker1", linear: false, offset: 0, endPhase: 0, targetPhase: 0, newFocusedIndex: 0 },
199− {tag: ">position1", positionMarker: "positionMarker1", linear: true, offset: +5, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
200− {tag: "<position2 (linear)", positionMarker: "positionMarker2", linear: true, offset: 0, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
201− {tag: "<position2 (non-linear)", positionMarker: "positionMarker2", linear: false, offset: 0, endPhase: 0, targetPhase: 0, newFocusedIndex: 1 },
202− {tag: ">position2", positionMarker: "positionMarker2", linear: true, offset: +5, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
203− {tag: "<position3", positionMarker: "positionMarker3", linear: true, offset: 0, endPhase: 1, targetPhase: 0, newFocusedIndex: 1 },
204− {tag: ">position3", positionMarker: "positionMarker3", linear: true, offset: +5, endPhase: 1, targetPhase: 2, newFocusedIndex: 2 },
200+ {tag: "<breakPoint (trigger)", progress: .2, cancel: false, endState: "staged", newFocusedIndex: 1 },
201+ {tag: "<breakPoint (cancel)", progress: .2, cancel: true, endState: "staged", newFocusedIndex: 0 },
202+ {tag: ">breakPoint (trigger)", progress: .5, cancel: false, endState: "spread", newFocusedIndex: 0 },
203+ {tag: ">breakPoint (cancel)", progress: .8, cancel: true, endState: "staged", newFocusedIndex: 0 },
205204 ];
206205 }
207206
208207 function test_enterSpread(data) {
209208 addApps(5)
210209
211− var spreadView = findChild(phoneStage, "spreadView");
212−
213− // Keep it inside the PhoneStage otherwise the controls on the right side will
210+ // Keep it inside the Stage otherwise the controls on the right side will
214211 // capture the press thus the "- 2" on startX.
215− var startX = phoneStage.width - 2;
216− var startY = phoneStage.height / 2;
212+ var startX = stage.width - 2;
213+ var startY = stage.height / 2;
217214 var endY = startY;
218− var endX = spreadView.width - (spreadView.width * spreadView[data.positionMarker]) - data.offset
219− - phoneStage.dragAreaWidth;
215+ var endX = stage.width - (stage.width * data.progress) - stage.dragAreaWidth;
220216
221217 var oldFocusedApp = ApplicationManager.get(0);
222218 var newFocusedApp = ApplicationManager.get(data.newFocusedIndex);
223219
224− touchFlick(phoneStage, startX, startY, endX, endY,
220+ touchFlick(stage, startX, startY, endX, endY,
225221 true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
226222
227− tryCompare(spreadView, "phase", data.endPhase)
228−
229− if (!data.linear) {
230− touchFlick(phoneStage, endX, endY, endX + units.gu(.5), endY,
231− false /* beginTouch */, false /* endTouch */, units.gu(10), 50);
232− touchFlick(phoneStage, endY + units.gu(.5), endY, endX, endY,
233− false /* beginTouch */, false /* endTouch */, units.gu(10), 50);
223+ if (data.cancel) {
224+ touchFlick(stage, endX, endY, endX + units.gu(5), endY,
225+ false /* beginTouch */, true /* endTouch */, units.gu(10), 50);
226+ } else {
227+ touchRelease(stage, endX, endY);
234228 }
235229
236− touchRelease(phoneStage, endX, endY);
237−
238− tryCompare(spreadView, "phase", data.targetPhase)
239−
240− if (data.targetPhase == 2) {
241− var app2 = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(2));
242− tryCompare(app2, "swipeToCloseEnabled", true);
243− mouseClick(app2, units.gu(1), units.gu(1));
244− }
245−
246− tryCompare(ApplicationManager, "focusedApplicationId", newFocusedApp.appId);
230+ tryCompare(stage, "state", data.endState);
231+ tryCompare(ApplicationManager, "focusedApplicationId", data.endState == "spread" ? "" : newFocusedApp.appId);
247232 }
248233
249234 function test_selectAppFromSpread_data() {
@@ -262,32 +247,26 @@ Item {
262247 function test_selectAppFromSpread(data) {
263248 addApps(data.total)
264249
265− var spreadView = findChild(phoneStage, "spreadView");
266−
267250 performEdgeSwipeToShowAppSpread();
268251
269− tryCompare(spreadView, "phase", 2);
270−
271− var tile = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(data.index));
252+ var tile = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(data.index));
272253 var appId = ApplicationManager.get(data.index).appId;
273254
274− if (tile.mapToItem(spreadView, 0, 0).x > spreadView.width) {
255+ if (tile.mapToItem(stage, 0, 0).x > stage.width) {
275256 // Item is not visible... Need to flick the spread
276− var startX = phoneStage.width - units.gu(1);
277− var startY = phoneStage.height / 2;
257+ var startX = stage.width - units.gu(1);
258+ var startY = stage.height / 2;
278259 var endY = startY;
279260 var endX = units.gu(2);
280− touchFlick(phoneStage, startX, startY, endX, endY, true, true, units.gu(10), 50)
281− tryCompare(spreadView, "flicking", false);
282− tryCompare(spreadView, "moving", false);
283−// waitForRendering(phoneStage);
261+ touchFlick(stage, startX, startY, endX, endY, true, true, units.gu(10), 50)
284262 }
285263
286264 console.log("clicking app", data.index, "(", appId, ")")
287− tryCompare(tile, "swipeToCloseEnabled", true);
288− mouseClick(spreadView, tile.mapToItem(spreadView, 0, 0).x + units.gu(1), spreadView.height / 2)
265+ var dragArea = findChild(tile, "dragArea");
266+ tryCompare(dragArea, "closeable", true);
267+ mouseClick(stage, tile.mapToItem(stage, 0, 0).x + units.gu(1), stage.height / 2)
289268 tryCompare(ApplicationManager, "focusedApplicationId", appId);
290− tryCompare(spreadView, "phase", 0);
269+ tryCompare(stage, "state", "staged");
291270 }
292271
293272 function test_select_data() {
@@ -301,12 +280,12 @@ Item {
301280 function test_select(data) {
302281 addApps(5);
303282
304− var spreadView = findChild(phoneStage, "spreadView");
283+ var spreadView = findChild(stage, "spreadView");
305284 var selectedApp = ApplicationManager.get(data.index);
306285
307286 performEdgeSwipeToShowAppSpread();
308287
309− phoneStage.select(selectedApp.appId);
288+ stage.select(selectedApp.appId);
310289
311290 tryCompare(spreadView, "contentX", -spreadView.shift);
312291
@@ -319,37 +298,14 @@ Item {
319298 var focusedAppId = ApplicationManager.focusedApplicationId;
320299
321300 performEdgeSwipeToShowAppSpread();
301+ tryCompare(stage, "state", "spread");
322302
323− mouseClick(phoneStage, units.gu(1), units.gu(1));
303+ mouseClick(stage, units.gu(1), units.gu(1));
324304
325− // Make sure the spread is in the idle position
326− var spreadView = findChild(phoneStage, "spreadView");
327− tryCompare(spreadView, "contentX", -spreadView.shift);
305+ tryCompare(stage, "state", "staged");
328306
329307 // Make sure the same app is still focused
330− compare(focusedAppId, ApplicationManager.focusedApplicationId);
331− }
332−
333− function init() {
334− // wait until unity8-dash is up and running.
335− // it's started automatically by ApplicationManager mock implementation
336− tryCompare(ApplicationManager, "count", 1);
337− var dashApp = ApplicationManager.findApplication("unity8-dash");
338− verify(dashApp);
339− tryCompare(dashApp, "state", ApplicationInfoInterface.Running);
340− }
341−
342− function cleanup() {
343− killApps();
344−
345− phoneStage.shellOrientationAngle = 0;
346− phoneStage.select(ApplicationManager.get(0).appId);
347−
348− // wait for PhoneStage to stabilize back into its initial state
349− var spreadView = findChild(phoneStage, "spreadView");
350− while (spreadView.phase !== 0 || spreadView.contentX !== -spreadView.shift || spreadView.selectedIndex != -1) {
351− wait(50);
352− }
308+ tryCompare(ApplicationManager, "focusedApplicationId", focusedAppId);
353309 }
354310
355311 function test_focusNewTopMostAppAfterFocusedOneClosesItself() {
@@ -369,57 +325,6 @@ Item {
369325 tryCompare(firstApp, "focused", true);
370326 }
371327
372− function test_cantCloseWhileSnapping() {
373− addApps(2);
374−
375− performEdgeSwipeToShowAppSpread();
376−
377− var spreadView = findChild(phoneStage, "spreadView");
378− var selectedApp = ApplicationManager.get(2);
379−
380− performEdgeSwipeToShowAppSpread();
381−
382− var app0 = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(0));
383− var app1 = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(1));
384− var app2 = findChild(spreadView, "spreadDelegate_" + topLevelSurfaceList.idAt(2));
385−
386− var dragArea0 = findChild(app0, "dragArea");
387− var dragArea1 = findChild(app1, "dragArea");
388− var dragArea2 = findChild(app2, "dragArea");
389−
390− compare(dragArea0.enabled, true);
391− compare(dragArea1.enabled, true);
392− compare(dragArea2.enabled, true);
393−
394− phoneStage.select(selectedApp.appId);
395−
396− // Make sure all drag areas are disabled instantly. Don't use tryCompare here!
397− compare(dragArea0.enabled, false);
398− compare(dragArea1.enabled, false);
399− compare(dragArea2.enabled, false);
400−
401− tryCompare(spreadView, "contentX", -spreadView.shift)
402− }
403−
404− function test_cantAccessPhoneStageWhileRightEdgeGesture() {
405− var spreadView = findChild(phoneStage, "spreadView");
406− var eventEaterArea = findChild(phoneStage, "eventEaterArea")
407−
408− var startX = phoneStage.width - 2;
409− var startY = phoneStage.height / 2;
410− var endY = startY;
411− var endX = phoneStage.width / 2;
412−
413− touchFlick(phoneStage, startX, startY, endX, endY,
414− true /* beginTouch */, false /* endTouch */, units.gu(10), 50);
415−
416− compare(eventEaterArea.enabled, true);
417−
418− touchRelease(phoneStage, endX, endY);
419−
420− compare(eventEaterArea.enabled, false);
421− }
422−
423328 function test_leftEdge_data() {
424329 return [
425330 { tag: "normal", inSpread: false, leftEdgeDragWidth: units.gu(5), shouldMoveApp: true },
@@ -434,12 +339,12 @@ Item {
434339 performEdgeSwipeToShowAppSpread();
435340 }
436341
437− var focusedDelegate = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(0));
438− phoneStage.inverseProgress = data.leftEdgeDragWidth;
342+ var focusedDelegate = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
343+ stage.inverseProgress = data.leftEdgeDragWidth;
439344
440345 tryCompare(focusedDelegate, "x", data.shouldMoveApp ? data.leftEdgeDragWidth : 0);
441346
442− phoneStage.inverseProgress = 0;
347+ stage.inverseProgress = 0;
443348
444349 tryCompare(focusedDelegate, "x", 0);
445350 }
@@ -447,9 +352,9 @@ Item {
447352 function test_focusedAppIsTheOnlyRunningApp() {
448353 addApps(2);
449354
450− var delegateA = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(0));
355+ var delegateA = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
451356 verify(delegateA);
452− var delegateB = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(1));
357+ var delegateB = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(1));
453358 verify(delegateB);
454359
455360 // A is focused and running, B is unfocused and suspended
@@ -460,7 +365,7 @@ Item {
460365
461366 // Switch foreground/focused appp from A to B
462367 performEdgeSwipeToShowAppSpread();
463− phoneStage.select(delegateB.application.appId);
368+ stage.select(delegateB.application.appId);
464369
465370 // Now it's the other way round
466371 // A is unfocused and suspended, B is focused and running
@@ -473,15 +378,15 @@ Item {
473378 function test_dashRemainsRunningIfStageIsToldSo() {
474379 addApps(1);
475380
476− var delegateDash = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(1));
381+ var delegateDash = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(1));
477382 verify(delegateDash);
478383 compare(delegateDash.application.appId, "unity8-dash");
479384
480− var delegateOther = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(0));
385+ var delegateOther = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
481386 verify(delegateOther);
482387
483388 performEdgeSwipeToShowAppSpread();
484− phoneStage.select("unity8-dash");
389+ tap(delegateDash, 1, 1);
485390
486391 tryCompare(delegateDash, "focus", true);
487392 tryCompare(delegateDash.application, "requestedState", ApplicationInfoInterface.RequestedRunning);
@@ -489,39 +394,38 @@ Item {
489394 compare(delegateOther.application.requestedState, ApplicationInfoInterface.RequestedSuspended);
490395
491396 performEdgeSwipeToShowAppSpread();
492− phoneStage.select(delegateOther.application.appId);
493−
397+ tap(delegateOther, 1, 1);
494398 // The other app gets focused and running but dash is kept running despite being unfocused
399+ tryCompare(delegateOther, "focus", true);
400+ tryCompare(delegateOther.application, "requestedState", ApplicationInfoInterface.RequestedRunning);
495401 tryCompare(delegateDash, "focus", false);
496402 tryCompare(delegateDash.application, "requestedState", ApplicationInfoInterface.RequestedRunning);
497− compare(delegateOther.focus, true);
498− compare(delegateOther.application.requestedState, ApplicationInfoInterface.RequestedRunning);
499403 }
500404
501405 function test_foregroundAppIsSuspendedWhenStageIsSuspended() {
502406 addApps(1);
503407
504− var delegate = findChild(phoneStage, "spreadDelegate_" + topLevelSurfaceList.idAt(0));
408+ var delegate = findChild(stage, "appDelegate_" + topLevelSurfaceList.idAt(0));
505409 verify(delegate);
506410
507411 compare(delegate.focus, true);
508412 compare(delegate.application.requestedState, ApplicationInfoInterface.RequestedRunning);
509413
510− phoneStage.suspended = true;
414+ stage.suspended = true;
511415
512416 tryCompare(delegate.application, "requestedState", ApplicationInfoInterface.RequestedSuspended);
513417
514− phoneStage.suspended = false;
418+ stage.suspended = false;
515419
516420 tryCompare(delegate.application, "requestedState", ApplicationInfoInterface.RequestedRunning);
517421 }
518422
519423 function test_mouseEdgePush() {
520− var spreadView = findChild(phoneStage, "spreadView")
424+ var spreadView = findChild(stage, "spreadView")
521425 addApps(1);
522− mouseMove(phoneStage, phoneStage.width - 1, units.gu(10));
426+ mouseMove(stage, stage.width - 1, units.gu(10));
523427 for (var i = 0; i < units.gu(10); i++) {
524− phoneStage.pushRightEdge(1);
428+ stage.pushRightEdge(1);
525429 }
526430 tryCompare(spreadView, "phase", 2);
527431 }
@@ -538,19 +442,18 @@ Item {
538442
539443 performEdgeSwipeToShowAppSpread();
540444
541− var appDelegate = findChild(phoneStage, "spreadDelegate_" + surface1Id);
542− verify(appDelegate);
543− tryCompare(appDelegate, "swipeToCloseEnabled", true);
445+ var appDelegate = findChild(stage, "appDelegate_" + surface1Id);
446+ var dragArea = findChild(appDelegate, "dragArea")
447+ verify(dragArea);
448+ tryCompare(dragArea, "closeable", true);
544449
545450 compare(webbrowserApp.surfaceList.count, 2);
546− compare(webbrowserApp.state, ApplicationInfoInterface.Running);
547451
548452 swipeSurfaceUpwards(surface1Id);
549453
550454 // Surface must eventually be gone
551455 tryCompareFunction(function() { return topLevelSurfaceList.indexForId(surface1Id); }, -1);
552456 tryCompare(webbrowserApp.surfaceList, "count", 1);
553− compare(webbrowserApp.state, ApplicationInfoInterface.Running);
554457 }
555458
556459 /*
@@ -631,11 +534,10 @@ Item {
631534
632535 performEdgeSwipeToShowAppSpread();
633536
634− {
635− var appDelegate = findChild(phoneStage, "spreadDelegate_" + webbrowserSurfaceId);
636− verify(appDelegate);
637− tryCompare(appDelegate, "swipeToCloseEnabled", true);
638− }
537+ var appDelegate = findChild(stage, "appDelegate_" + webbrowserSurfaceId);
538+ var dragArea = findChild(appDelegate, "dragArea");
539+ verify(dragArea);
540+ tryCompare(dragArea, "closeable", true);
639541
640542 swipeSurfaceUpwards(webbrowserSurfaceId);
641543