on xenial help sign in
Fix tst_Tutorial
aaf581aDaniel d'Andrada
tests/qmltests/Tutorial/tst_Tutorial.qml+9−8
@@ -224,9 +224,9 @@ Rectangle {
224 onCheckedChanged: {
224 onCheckedChanged: {
225 var surface = topLevelSurfaceList.inputMethodSurface;
225 var surface = topLevelSurfaceList.inputMethodSurface;
226 if (checked) {
226 if (checked) {
227− surface.setState(Mir.RestoredState);
227+ surface.requestState(Mir.RestoredState);
228 } else {
228 } else {
229− surface.setState(Mir.MinimizedState);
229+ surface.requestState(Mir.MinimizedState);
230 }
230 }
231 }
231 }
232 }
232 }
@@ -262,7 +262,6 @@ Rectangle {
262 topLevelSurfaceList = null;
262 topLevelSurfaceList = null;
263 }
263 }
264 }
264 }
265− property var topLevelSurfaceList: null
266
265
267 function init() {
266 function init() {
268 prepareShell();
267 prepareShell();
@@ -271,8 +270,6 @@ Rectangle {
271 var tutorialLeftTimer = findInvisibleChild(tutorialLeft, "tutorialLeftTimer");
270 var tutorialLeftTimer = findInvisibleChild(tutorialLeft, "tutorialLeftTimer");
272 tutorialLeftTimer.interval = 0;
271 tutorialLeftTimer.interval = 0;
273 tryCompare(tutorialLeft, "opacity", 1);
272 tryCompare(tutorialLeft, "opacity", 1);
274−
275− stage = findChild(shell, "stage"); // from StageTestCase
276 }
273 }
277
274
278 function cleanup() {
275 function cleanup() {
@@ -317,6 +314,10 @@ Rectangle {
317 AccountsService.demoEdges = true;
314 AccountsService.demoEdges = true;
318
315
319 LightDM.Greeter.hideGreeter();
316 LightDM.Greeter.hideGreeter();
317+
318+ stage = findChild(shell, "stage"); // from StageTestCase
319+
320+ startApplication("unity8-dash");
320 }
321 }
321
322
322 function loadShell(state) {
323 function loadShell(state) {
@@ -329,7 +330,7 @@ Rectangle {
329 verify(surfaceManager);
330 verify(surfaceManager);
330 surfaceManager.createInputMethodSurface();
331 surfaceManager.createInputMethodSurface();
331
332
332− tryCompareFunction(function() { return root.topLevelSurfaceList.inputMethodSurface !== null }, true);
333+ tryCompareFunction(function() { return topLevelSurfaceList.inputMethodSurface !== null }, true);
333 }
334 }
334
335
335 function swipeAwayGreeter() {
336 function swipeAwayGreeter() {
@@ -732,7 +733,7 @@ Rectangle {
732
733
733 ensureInputMethodSurface();
734 ensureInputMethodSurface();
734 var surface = topLevelSurfaceList.inputMethodSurface;
735 var surface = topLevelSurfaceList.inputMethodSurface;
735− surface.setState(Mir.RestoredState);
736+ surface.requestState(Mir.RestoredState);
736
737
737 var inputMethod = findInvisibleChild(shell, "inputMethod");
738 var inputMethod = findInvisibleChild(shell, "inputMethod");
738 tryCompare(inputMethod, "visible", true);
739 tryCompare(inputMethod, "visible", true);
@@ -745,7 +746,7 @@ Rectangle {
745 verify(!tutorial.delayed);
746 verify(!tutorial.delayed);
746
747
747 ensureInputMethodSurface();
748 ensureInputMethodSurface();
748− topLevelSurfaceList.inputMethodSurface.setState(Mir.RestoredState);
749+ topLevelSurfaceList.inputMethodSurface.requestState(Mir.RestoredState);
749
750
750 tryCompare(tutorial, "delayed", true);
751 tryCompare(tutorial, "delayed", true);
751 }
752 }