Bug 1306786 - Fix intermittent browser/base/content/test/popupNotifications/browser_popupNotification_4.js
MozReview-Commit-ID: 6Ok06hRXFUa
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
@@ -128,17 +128,19 @@ var tests = [
let notification = showNotification(notifyObj);
let win = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
yield whenDelayedStartupFinished(win);
let [tab] = win.gBrowser.tabs;
let anchor = win.document.getElementById("default-notification-icon");
yield new Promise(resolve => {
+ let originalCallback = notification.options.eventCallback;
notification.options.eventCallback = function (eventName) {
+ originalCallback(eventName);
if (eventName == "shown") {
resolve();
}
};
info("Showing the notification again");
notification.reshow();
});