--- a/browser/base/content/test/captivePortal/head.js+++ b/browser/base/content/test/captivePortal/head.js@@ -93,19 +93,18 @@ async function focusWindowAndWaitForPort function ensurePortalTab(win) { // For the tests that call this function, it's enough to ensure there // are two tabs in the window - the default tab and the portal tab. is(win.gBrowser.tabs.length, 2, "There should be a captive portal tab in the window."); } function ensurePortalNotification(win) {- let notificationBox =- win.document.getElementById("high-priority-global-notificationbox");- let notification = notificationBox.getNotificationWithValue(PORTAL_NOTIFICATION_VALUE);+ let notification = win.gHighPriorityNotificationBox.getNotificationWithValue(+ PORTAL_NOTIFICATION_VALUE); isnot(notification, null, "There should be a captive portal notification in the window."); return notification; } // Helper to test whether the "Show Login Page" is visible in the captive portal // notification (it should be hidden when the portal tab is selected). function testShowLoginPageButtonVisibility(notification, visibility) {@@ -117,19 +116,18 @@ function testShowLoginPageButtonVisibili } function ensureNoPortalTab(win) { is(win.gBrowser.tabs.length, 1, "There should be no captive portal tab in the window."); } function ensureNoPortalNotification(win) {- let notificationBox =- win.document.getElementById("high-priority-global-notificationbox");- is(notificationBox.getNotificationWithValue(PORTAL_NOTIFICATION_VALUE), null,+ is(win.gHighPriorityNotificationBox+ .getNotificationWithValue(PORTAL_NOTIFICATION_VALUE), null, "There should be no captive portal notification in the window."); } /** * Some tests open a new window and close it later. When the window is closed, * the original window opened by mochitest gains focus, generating an * activate event. If the next test also opens a new window * before this event has a chance to fire, CaptivePortalWatcher picks