on xenial help sign in
revert back to activeFocus, make it a bit more robust
commitde456b8066f2fcf73b0132d8b679cc2cfa0b3f01 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 14 Oct 2014, 14:03 (12 years ago) parent8cf66da
1 file changed+4−3
tests/qmltests/tst_Shell.qml+4−3
tests/qmltests/tst_Shell.qml+4−3
@@ -212,7 +212,7 @@ Item {
212212 // Open an application and focus
213213 waitUntilApplicationWindowIsFullyVisible(app);
214214 ApplicationManager.focusApplication(app);
215− compare(app.session.surface.focus, true, "Focused application didn't have activeFocus");
215+ compare(app.session.surface.activeFocus, true, "Focused application didn't have activeFocus");
216216
217217 notifications.model = mockNotificationsModel;
218218
@@ -232,15 +232,16 @@ 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.focus, false, "Notification didn't take active focus");
235+ compare(app.session.surface.activeFocus, false, "Notification didn't take active focus");
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)
241242
242243 // Make sure we're back to normal
243− compare(app.session.surface.focus, true, "App didn't take active focus after snap notification was dismissed");
244+ compare(app.session.surface.activeFocus, true, "App didn't take active focus after snap notification was dismissed");
244245 compare(stage.interactive, true, "Stages not interactive again after modal notification has closed");
245246 }
246247