Bug 934748 - Refactored browser_popupNotification_3.js to use addProgressListener+executeSoon rather than addTabsProgressListener. r=smacleod

This commit is contained in:
Avijit Gupta 2015-02-04 00:26:22 +05:30
parent aaffebe44e
commit 3b96966931

View File

@ -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/");
},