@@ -547,7 +547,7 @@ Rectangle {
547547 }
548548 }
549549
550− UnityTestCase {
550+ StageTestCase {
551551 id: testCase
552552 name: "Shell"
553553 when: windowShown
@@ -595,6 +595,8 @@ Rectangle {
595595 topLevelSurfaceList = findInvisibleChild(shell, "topLevelSurfaceList");
596596 verify(topLevelSurfaceList);
597597
598+ stage = findChild(shell, "stage"); // from StageTestCase
599+
598600 // wait until unity8-dash is fully loaded
599601 tryCompare(topLevelSurfaceList, "count", 1);
600602 waitUntilAppWindowIsFullyLoaded(topLevelSurfaceList.idAt(0));
@@ -1042,27 +1044,6 @@ Rectangle {
10421044 tryCompare(item, "visible", false);
10431045 }
10441046
1045− function findAppWindowForSurfaceId(surfaceId) {
1046− // for PhoneStage and TabletStage
1047− var delegate = findChild(shell, "spreadDelegate_" + surfaceId, 0 /* timeout */);
1048− if (!delegate) {
1049− // for DesktopStage
1050− delegate = findChild(shell, "appDelegate_" + surfaceId);
1051− }
1052− verify(delegate);
1053− var appWindow = findChild(delegate, "appWindow");
1054− return appWindow;
1055− }
1056−
1057− // Wait until the ApplicationWindow for the given Application object is fully loaded
1058− // (ie, the real surface has replaced the splash screen)
1059− function waitUntilAppWindowIsFullyLoaded(surfaceId) {
1060− var appWindow = findAppWindowForSurfaceId(surfaceId);
1061− var appWindowStateGroup = findInvisibleChild(appWindow, "applicationWindowStateGroup");
1062− tryCompareFunction(function() { return appWindowStateGroup.state === "surface" }, true);
1063− waitUntilTransitionsEnd(appWindowStateGroup);
1064− }
1065−
10661047 function test_surfaceLosesActiveFocusWhilePanelIsOpen() {
10671048 loadShell("phone");
10681049 swipeAwayGreeter();