@@ -649,18 +649,17 @@ Rectangle {
649 var cameraSurfaceId = topLevelSurfaceList.nextId;
649 var cameraSurfaceId = topLevelSurfaceList.nextId;
650 var cameraApp = ApplicationManager.startApplication("camera-app");
650 var cameraApp = ApplicationManager.startApplication("camera-app");
651 verify(cameraApp);
651 verify(cameraApp);
652+ tryVerify(function() {return cameraApp.surfaceList.get(0)});
653+ var cameraSurface = cameraApp.surfaceList.get(0);
653 // ensure the mock camera-app is as we expect
655 // ensure the mock camera-app is as we expect
654− compare(cameraApp.fullscreen, true);
656+ tryCompare(cameraSurface, "state", Mir.FullscreenState, 1000);
655 compare(cameraApp.rotatesWindowContents, true);
657 compare(cameraApp.rotatesWindowContents, true);
656 compare(cameraApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
658 compare(cameraApp.supportedOrientations, Qt.PortraitOrientation | Qt.LandscapeOrientation
657 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
659 | Qt.InvertedPortraitOrientation | Qt.InvertedLandscapeOrientation);
659 waitUntilAppWindowIsFullyLoaded(cameraSurfaceId);
661 waitUntilAppWindowIsFullyLoaded(cameraSurfaceId);
661− var cameraSurface = cameraApp.surfaceList.get(0);
662− verify(cameraSurface);
664 var focusChangedSpy = signalSpy;
663 var focusChangedSpy = signalSpy;
665 focusChangedSpy.clear();
664 focusChangedSpy.clear();
666 focusChangedSpy.target = cameraSurface;
665 focusChangedSpy.target = cameraSurface;
@@ -697,8 +696,8 @@ Rectangle {
698 if (!data.windowed) { // subject to shell-chrome policies
697 if (!data.windowed) { // subject to shell-chrome policies
699 // It should retain native dimensions regardless of its rotation/orientation
698 // It should retain native dimensions regardless of its rotation/orientation
700− compare(cameraSurface.width, orientedShell.width);
699+ tryCompare(cameraSurface, "width", orientedShell.width);
701− compare(cameraSurface.height, orientedShell.height);
700+ tryCompare(cameraSurface, "height", orientedShell.height);
704 // Surface focus shouldn't have been touched because of the rotation
703 // Surface focus shouldn't have been touched because of the rotation