@@ -649,18 +649,17 @@ Rectangle {
649649 var cameraSurfaceId = topLevelSurfaceList.nextId;
650650 var cameraApp = ApplicationManager.startApplication("camera-app");
651651 verify(cameraApp);
652+ tryVerify(function() {return cameraApp.surfaceList.get(0)});
653+ var cameraSurface = cameraApp.surfaceList.get(0);
652654
653655 // ensure the mock camera-app is as we expect
654− compare(cameraApp.fullscreen, true);
656+ tryCompare(cameraSurface, "state", Mir.FullscreenState, 1000);
655657 compare(cameraApp.rotatesWindowContents, true);
656658 compare(cameraApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
657659 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
658660
659661 waitUntilAppWindowIsFullyLoaded(cameraSurfaceId);
660662
661− var cameraSurface = cameraApp.surfaceList.get(0);
662− verify(cameraSurface);
663−
664663 var focusChangedSpy = signalSpy;
665664 focusChangedSpy.clear();
666665 focusChangedSpy.target = cameraSurface;
@@ -697,8 +696,8 @@ Rectangle {
697696
698697 if (!data.windowed) { // subject to shell-chrome policies
699698 // It should retain native dimensions regardless of its rotation/orientation
700− compare(cameraSurface.width, orientedShell.width);
701− compare(cameraSurface.height, orientedShell.height);
699+ tryCompare(cameraSurface, "width", orientedShell.width);
700+ tryCompare(cameraSurface, "height", orientedShell.height);
702701 }
703702
704703 // Surface focus shouldn't have been touched because of the rotation