mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934748 - Refactored browser_popupNotification_3.js to use addProgressListener+executeSoon rather than addTabsProgressListener. r=smacleod
This commit is contained in:
parent
aaffebe44e
commit
3b96966931
@ -246,22 +246,22 @@ let tests = [
|
||||
onShown: function (popup) {
|
||||
let self = this;
|
||||
let progressListener = {
|
||||
onLocationChange: function onLocationChange(aBrowser) {
|
||||
if (aBrowser != gBrowser.selectedBrowser) {
|
||||
return;
|
||||
}
|
||||
let notification = PopupNotifications.getNotification(self.notifyObj.id,
|
||||
self.notifyObj.browser);
|
||||
ok(notification != null, "Notification remained when subframe navigated");
|
||||
self.notifyObj.options.eventCallback = undefined;
|
||||
onLocationChange: function onLocationChange() {
|
||||
gBrowser.removeProgressListener(progressListener);
|
||||
|
||||
notification.remove();
|
||||
gBrowser.removeTabsProgressListener(progressListener);
|
||||
executeSoon(() => {
|
||||
let notification = PopupNotifications.getNotification(self.notifyObj.id,
|
||||
self.notifyObj.browser);
|
||||
ok(notification != null, "Notification remained when subframe navigated");
|
||||
self.notifyObj.options.eventCallback = undefined;
|
||||
|
||||
notification.remove();
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
info("Adding progress listener and performing navigation");
|
||||
gBrowser.addTabsProgressListener(progressListener);
|
||||
gBrowser.addProgressListener(progressListener);
|
||||
content.document.getElementById("iframe")
|
||||
.setAttribute("src", "http://example.org/");
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user