diff --git a/browser/base/content/test/alerts/browser_notification_open_settings.js b/browser/base/content/test/alerts/browser_notification_open_settings.js deleted file mode 100644 index f339af140fb1..000000000000 --- a/browser/base/content/test/alerts/browser_notification_open_settings.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -add_task(function* test_settingsOpen() { - info("Opening a dummy tab so openPreferences=>switchToTabHavingURI doesn't use the blank tab."); - yield BrowserTestUtils.withNewTab({ - gBrowser, - url: "about:robots" - }, function* dummyTabTask(aBrowser) { - let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "about:preferences#content"); - info("simulate a notifications-open-settings notification"); - let uri = NetUtil.newURI("https://example.com"); - let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {}); - Services.obs.notifyObservers(principal, "notifications-open-settings", null); - let tab = yield tabPromise; - ok(tab, "The notification settings tab opened"); - BrowserTestUtils.removeTab(tab); - }); -}); diff --git a/browser/base/content/test/general/browser.ini b/browser/base/content/test/general/browser.ini index 41a5b611273c..9d308d576cfd 100644 --- a/browser/base/content/test/general/browser.ini +++ b/browser/base/content/test/general/browser.ini @@ -62,6 +62,7 @@ support-files = file_bug970276_favicon1.ico file_bug970276_favicon2.ico file_documentnavigation_frameset.html + file_dom_notifications.html file_double_close_tab.html file_favicon_change.html file_favicon_change_not_in_document.html @@ -337,6 +338,8 @@ skip-if = os != "win" # The Fitts Law menu button is only supported on Windows ( skip-if = e10s # Bug 1100664 - test directly access content docShells (TypeError: gBrowser.docShell is null) [browser_mixedcontent_securityflags.js] tags = mcb +[browser_notification_tab_switching.js] +skip-if = buildapp == 'mulet' || e10s # Bug 1100662 - content access causing uncaught exception - Error: cannot ipc non-cpow object at chrome://mochitests/content/browser/browser/base/content/test/general/browser_notification_tab_switching.js:32 (or in RemoteAddonsChild.jsm) [browser_offlineQuotaNotification.js] skip-if = buildapp == 'mulet' || e10s # Bug 1093603 - test breaks with PopupNotifications.panel.firstElementChild is null [browser_overflowScroll.js] diff --git a/browser/base/content/test/alerts/browser_notification_tab_switching.js b/browser/base/content/test/general/browser_notification_tab_switching.js similarity index 95% rename from browser/base/content/test/alerts/browser_notification_tab_switching.js rename to browser/base/content/test/general/browser_notification_tab_switching.js index 482b54fbb63a..161e4e14958d 100644 --- a/browser/base/content/test/alerts/browser_notification_tab_switching.js +++ b/browser/base/content/test/general/browser_notification_tab_switching.js @@ -6,7 +6,7 @@ var tab; var notification; -var notificationURL = "http://example.org/browser/browser/base/content/test/alerts/file_dom_notifications.html"; +var notificationURL = "http://example.org/browser/browser/base/content/test/general/file_dom_notifications.html"; var newWindowOpenedFromTab; function test () { @@ -58,7 +58,7 @@ function onAlertShowing() { info("Notification alert showing"); notification.removeEventListener("show", onAlertShowing); - let alertWindow = Services.wm.getMostRecentWindow("alert:alert"); + let alertWindow = findChromeWindowByURI("chrome://global/content/alerts/alert.xul"); if (!alertWindow) { todo(false, "Notifications don't use XUL windows on all platforms."); notification.close(); diff --git a/browser/base/content/test/alerts/file_dom_notifications.html b/browser/base/content/test/general/file_dom_notifications.html similarity index 97% rename from browser/base/content/test/alerts/file_dom_notifications.html rename to browser/base/content/test/general/file_dom_notifications.html index 7cbdebdd48e0..078c94a42d18 100644 --- a/browser/base/content/test/alerts/file_dom_notifications.html +++ b/browser/base/content/test/general/file_dom_notifications.html @@ -1,6 +1,5 @@ -