@@ -245,20 +245,17 @@ Item {
247 function test_fullscreenMode() {
247 function test_fullscreenMode() {
248− for (var i = 0; i < 5; i++) {
250− tryCompare(phoneStage, "fullscreen", ApplicationManager.get(0).fullscreen);
253 var fullscreenApp = null;
248 var fullscreenApp = null;
254 var normalApp = null;
249 var normalApp = null;
256− for (var i = 0; i < ApplicationManager.count; i++) {
251+ for (var i = 0; i < 5; i++) {
257− if (ApplicationManager.get(i).fullscreen && fullscreenApp == null) {
253+ var newApp = ApplicationManager.get(0);
254+ tryCompare(phoneStage, "fullscreen", newApp.fullscreen);
255+ if (newApp.fullscreen && fullscreenApp == null) {
258− fullscreenApp = ApplicationManager.get(i);
256+ fullscreenApp = newApp;
260− if (!ApplicationManager.get(i).fullscreen && normalApp == null) {
257+ } else if (!newApp.fullscreen && normalApp == null){
261− normalApp = ApplicationManager.get(i);
258+ normalApp = newApp;
264 verify(fullscreenApp != null); // Can't continue the test without having a fullscreen app
261 verify(fullscreenApp != null); // Can't continue the test without having a fullscreen app