on xenial help sign in
cerry-pick fix over
commit416596767bca15ef9bdf551fb2dc824fab10b4d9 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 14 Oct 2014, 16:18 (12 years ago) parentde456b8
1 file changed+3−4
tests/qmltests/tst_Shell.qml+3−4
tests/qmltests/tst_Shell.qml+3−4
@@ -212,7 +212,7 @@ Item {
212212 // Open an application and focus
213213 waitUntilApplicationWindowIsFullyVisible(app);
214214 ApplicationManager.focusApplication(app);
215− compare(app.session.surface.activeFocus, true, "Focused application didn't have activeFocus");
215+ tryCompare(app.session.surface, "activeFocus", true);
216216
217217 notifications.model = mockNotificationsModel;
218218
@@ -232,16 +232,15 @@ Item {
232232 verify(notification !== undefined && notification != null, "notification wasn't found");
233233
234234 // 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);
236236 compare(stage.interactive, false, "the stage is interactive with a notification showing")
237237
238238 // Clicking the button should dismiss the notification and return focus
239239 var buttonAccept = findChild(notification, "notify_button0");
240240 mouseClick(buttonAccept, buttonAccept.width / 2, buttonAccept.height / 2);
241− waitForRendering(shell)
242241
243242 // 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);
245244 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");
246245 }
247246