@@ -42,27 +42,23 @@ UnityTestCase {
4242 Returns the appDelegate of the first surface created by the app with the specified appId
4343 */
4444 function startApplication(appId) {
45− try {
46− var app = ApplicationManager.findApplication(appId);
47− if (app) {
48− for (var i = 0; i < topLevelSurfaceList.count; i++) {
49− if (topLevelSurfaceList.applicationAt(i).appId === appId) {
50− var appRepeater = findChild(stage, "appRepeater");
51− verify(appRepeater);
52− return appRepeater.itemAt(i);
53− }
45+ var app = ApplicationManager.findApplication(appId);
46+ if (app) {
47+ for (var i = 0; i < topLevelSurfaceList.count; i++) {
48+ if (topLevelSurfaceList.applicationAt(i).appId === appId) {
49+ var appRepeater = findChild(stage, "appRepeater");
50+ verify(appRepeater);
51+ return appRepeater.itemAt(i);
5452 }
5553 }
54+ }
5655
57− var surfaceId = topLevelSurfaceList.nextId;
58− app = ApplicationManager.startApplication(appId);
59− verify(app);
60− waitUntilAppWindowIsFullyLoaded(surfaceId);
61− compare(app.surfaceList.count, 1);
56+ var surfaceId = topLevelSurfaceList.nextId;
57+ app = ApplicationManager.startApplication(appId);
58+ verify(app);
59+ waitUntilAppWindowIsFullyLoaded(surfaceId);
60+ compare(app.surfaceList.count, 1);
6261
63− return findChild(stage, "appDelegate_" + surfaceId);
64− } catch(err) {
65− throw new Error("startApplication("+appId+") called from line " + util.callerLine(1) + " failed!");
66− }
62+ return findChild(stage, "appDelegate_" + surfaceId);
6763 }
6864}