@@ -245,13 +245,12 @@ Rectangle {
245 function test_showSplashUntilAppFullyInit_data() {
245 function test_showSplashUntilAppFullyInit_data() {
247 {tag: "state=Running then create surface", swapInitOrder: false},
247 {tag: "state=Running then create surface", swapInitOrder: false},
249 {tag: "create surface then state=Running", swapInitOrder: true},
248 {tag: "create surface then state=Running", swapInitOrder: true},
253 function test_showSplashUntilAppFullyInit() {
252 function test_showSplashUntilAppFullyInit() {
254− verify(stateGroup.state === "splashScreen");
253+ verify(stateGroup.state === "splash");
256 if (data.swapInitOrder) {
255 if (data.swapInitOrder) {
257 surfaceCheckbox.checked = true;
256 surfaceCheckbox.checked = true;
@@ -259,7 +258,7 @@ Rectangle {
259 setApplicationState(appRunning);
258 setApplicationState(appRunning);
262− verify(stateGroup.state === "splashScreen");
261+ verify(stateGroup.state === "splash");
264 if (data.swapInitOrder) {
263 if (data.swapInitOrder) {
265 setApplicationState(appRunning);
264 setApplicationState(appRunning);
@@ -284,27 +283,8 @@ Rectangle {
284 waitUntilTransitionsEnd(stateGroup);
283 waitUntilTransitionsEnd(stateGroup);
287− function test_killedAppShowsScreenshot() {
288− surfaceCheckbox.checked = true;
289− setApplicationState(appRunning);
290− tryCompare(stateGroup, "state", "surface");
292− setApplicationState(appSuspended);
294− verify(stateGroup.state === "surface");
295− verify(fakeApplication.surface !== null);
298− surfaceCheckbox.checked = false;
299− setApplicationState(appStopped);
301− tryCompare(stateGroup, "state", "screenshot");
302− tryCompare(fakeApplication.surfaceList, "count", 0);
305 function test_restartApp() {
286 function test_restartApp() {
306− var screenshotImage = findChild(applicationWindow, "screenshotImage");
287+ tryCompare(stateGroup, "state", "splash");
308 surfaceCheckbox.checked = true;
288 surfaceCheckbox.checked = true;
309 setApplicationState(appRunning);
289 setApplicationState(appRunning);
310 tryCompare(stateGroup, "state", "surface");
290 tryCompare(stateGroup, "state", "surface");
@@ -316,26 +296,23 @@ Rectangle {
316 surfaceCheckbox.checked = false;
296 surfaceCheckbox.checked = false;
317 setApplicationState(appStopped);
297 setApplicationState(appStopped);
319− tryCompare(stateGroup, "state", "screenshot");
320 waitUntilTransitionsEnd(stateGroup);
299 waitUntilTransitionsEnd(stateGroup);
321− tryCompare(applicationWindow, "surface", null);
300+ tryCompare(stateGroup, "state", "surface");
323 // and restart it
302 // and restart it
324 setApplicationState(appStarting);
303 setApplicationState(appStarting);
326 waitUntilTransitionsEnd(stateGroup);
305 waitUntilTransitionsEnd(stateGroup);
327− verify(stateGroup.state === "screenshot");
306+ verify(stateGroup.state === "surface");
328− verify(applicationWindow.surface === null);
330 setApplicationState(appRunning);
308 setApplicationState(appRunning);
332 waitUntilTransitionsEnd(stateGroup);
310 waitUntilTransitionsEnd(stateGroup);
333− verify(stateGroup.state === "screenshot");
311+ verify(stateGroup.state === "surface");
335 surfaceCheckbox.checked = true;
313 surfaceCheckbox.checked = true;
337 tryCompare(stateGroup, "state", "surface");
315 tryCompare(stateGroup, "state", "surface");
338− tryCompare(screenshotImage, "status", Image.Null);
341 function test_appCrashed() {
318 function test_appCrashed() {
@@ -343,13 +320,15 @@ Rectangle {
343 setApplicationState(appRunning);
320 setApplicationState(appRunning);
344 tryCompare(stateGroup, "state", "surface");
321 tryCompare(stateGroup, "state", "surface");
345 waitUntilTransitionsEnd(stateGroup);
322 waitUntilTransitionsEnd(stateGroup);
323+ var surface = applicationWindow.surface;
347 // oh, it crashed...
325 // oh, it crashed...
348 surfaceCheckbox.checked = false;
326 surfaceCheckbox.checked = false;
349 setApplicationState(appStopped);
327 setApplicationState(appStopped);
329+ waitUntilTransitionsEnd(stateGroup);
351− tryCompare(stateGroup, "state", "screenshot");
330+ tryCompare(stateGroup, "state", "surface");
352− tryCompare(applicationWindow, "surface", null);
331+ tryCompare(applicationWindow, "surface", surface);
355 function test_keepSurfaceWhileInvisible() {
334 function test_keepSurfaceWhileInvisible() {
@@ -393,17 +372,6 @@ Rectangle {
393 verify(surfaceItem.touchReleaseCount === 1);
372 verify(surfaceItem.touchReleaseCount === 1);
396− function test_showNothingOnSuddenSurfaceLoss() {
397− surfaceCheckbox.checked = true;
398− setApplicationState(appRunning);
399− tryCompare(stateGroup, "state", "surface");
400− waitUntilTransitionsEnd(stateGroup);
402− applicationWindow.surface = null;
404− tryCompare(stateGroup, "state", "void");
407 function test_surfaceActiveFocusFollowsAppWindowInterative() {
375 function test_surfaceActiveFocusFollowsAppWindowInterative() {
408 applicationWindow.interactive = false;
376 applicationWindow.interactive = false;
409 applicationWindow.interactive = true;
377 applicationWindow.interactive = true;