@@ -212,7 +212,7 @@ Item {
212 // Open an application and focus
212 // Open an application and focus
213 waitUntilApplicationWindowIsFullyVisible(app);
213 waitUntilApplicationWindowIsFullyVisible(app);
214 ApplicationManager.focusApplication(app);
214 ApplicationManager.focusApplication(app);
215− compare(app.session.surface.activeFocus, true, "Focused application didn't have activeFocus");
215+ tryCompare(app.session.surface, "activeFocus", true);
217 notifications.model = mockNotificationsModel;
217 notifications.model = mockNotificationsModel;
@@ -232,16 +232,15 @@ Item {
232 verify(notification !== undefined && notification != null, "notification wasn't found");
232 verify(notification !== undefined && notification != null, "notification wasn't found");
234 // Make sure activeFocus went away from the app window
234 // Make sure activeFocus went away from the app window
235− compare(app.session.surface.activeFocus, false, "Notification didn't take active focus");
235+ tryCompare(app.session.surface, "activeFocus", false);
236 compare(stage.interactive, false, "the stage is interactive with a notification showing")
236 compare(stage.interactive, false, "the stage is interactive with a notification showing")
238 // Clicking the button should dismiss the notification and return focus
238 // Clicking the button should dismiss the notification and return focus
239 var buttonAccept = findChild(notification, "notify_button0");
239 var buttonAccept = findChild(notification, "notify_button0");
240 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2);
240 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2);
241− waitForRendering(shell)
243 // Make sure we're back to normal
242 // Make sure we're back to normal
244− compare(app.session.surface.activeFocus, true, "App didn't take active focus after snap notification was dismissed");
243+ tryCompare(app.session.surface, "activeFocus", true);
245 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");
244 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");