Backed out changesets e8b0b4daa733 and d89066cb6f59 (bug 853972) for mochitest-bc timeouts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 13 Jan 2014 11:37:19 -0500
changeset 163167 97d423929fc6adba9377a7a87fc57a8b968ba9b4
parent 163166 b1616355b4395753a048689ae387b0571ba59c45
child 163168 d0272e5500a0153361405e19a52f86e55964b1f4
push id25983
push userryanvm@gmail.com
push dateMon, 13 Jan 2014 22:37:56 +0000
treeherdermozilla-central@34697b7131dd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs853972
milestone29.0a1
backs oute8b0b4daa733da06b2ee353500faaaacb4168fad
d89066cb6f59a8945c0f08a56dd938e56a8722a8
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changesets e8b0b4daa733 and d89066cb6f59 (bug 853972) for mochitest-bc timeouts.
browser/base/content/content.js
browser/base/content/tabbrowser.xml
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_notification_tab_switching.js
browser/base/content/test/general/file_dom_notifications.html
dom/src/notification/Notification.cpp
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -272,12 +272,8 @@ let ClickEventHandler = {
 
     // In case of XLink, we don't return the node we got href from since
     // callers expect <a>-like elements.
     // Note: makeURI() will throw if aUri is not a valid URI.
     return [href ? makeURI(href, null, baseURI).spec : null, null];
   }
 };
 ClickEventHandler.init();
-
-addEventListener("DOMWebNotificationClicked", function(event) {
-  sendAsyncMessage("DOMWebNotificationClicked", {});
-}, false);
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2941,44 +2941,33 @@
 
       <method name="receiveMessage">
         <parameter name="aMessage"/>
         <body><![CDATA[
           let json = aMessage.json;
           let browser = aMessage.target;
 
           switch (aMessage.name) {
-            case "DOMTitleChanged": {
+            case "DOMTitleChanged":
               let tab = this._getTabForBrowser(browser);
               if (!tab)
                 return;
               let titleChanged = this.setTabTitle(tab);
               if (titleChanged && !tab.selected && !tab.hasAttribute("busy"))
                 tab.setAttribute("titlechanged", "true");
               break;
-            }
-            case "contextmenu": {
+            case "contextmenu":
               gContextMenuContentData = { event: aMessage.objects.event,
                                           browser: browser };
               let popup = browser.ownerDocument.getElementById("contentAreaContextMenu");
               popup.openPopup(browser, "overlap",
                               gContextMenuContentData.event.clientX,
                               gContextMenuContentData.event.clientY,
                               true, false, null);
               break;
-            }
-            case "DOMWebNotificationClicked": {
-              let tab = this._getTabForBrowser(browser);
-              if (!tab)
-                return;
-              this.selectedTab = tab;
-              let focusManager = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
-              focusManager.activeWindow = window;
-              break;
-            }
           }
         ]]></body>
       </method>
 
       <constructor>
         <![CDATA[
           let browserStack = document.getAnonymousElementByAttribute(this, "anonid", "browserStack");
           this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
@@ -3026,17 +3015,16 @@
             Services.prefs.getBoolPref("browser.display.use_system_colors") ?
               "-moz-default-background-color" :
               Services.prefs.getCharPref("browser.display.background_color");
 
           if (Services.appinfo.browserTabsRemote) {
             messageManager.addMessageListener("DOMTitleChanged", this);
             messageManager.addMessageListener("contextmenu", this);
           }
-          messageManager.addMessageListener("DOMWebNotificationClicked", this);
         ]]>
       </constructor>
 
       <method name="_generateUniquePanelID">
         <body><![CDATA[
           if (!this._uniquePanelIDCounter) {
             this._uniquePanelIDCounter = 0;
           }
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -46,17 +46,16 @@ support-files =
   file_bug902156_2.html
   file_bug902156_3.html
   file_bug906190_1.html
   file_bug906190_2.html
   file_bug906190_3_4.html
   file_bug906190_redirected.html
   file_bug906190.js
   file_bug906190.sjs
-  file_dom_notifications.html
   file_fullscreen-window-open.html
   head.js
   healthreport_testRemoteCommands.html
   moz.png
   offlineQuotaNotification.cacheManifest
   offlineQuotaNotification.html
   page_style_sample.html
   plugin_add_dynamically.html
@@ -261,17 +260,16 @@ skip-if = true # browser_drag.js is disa
 [browser_keywordSearch.js]
 [browser_keywordSearch_postData.js]
 [browser_lastAccessedTab.js]
 [browser_locationBarCommand.js]
 [browser_locationBarExternalLoad.js]
 [browser_middleMouse_inherit.js]
 [browser_minimize.js]
 [browser_mixedcontent_securityflags.js]
-[browser_notification_tab_switching.js]
 [browser_offlineQuotaNotification.js]
 [browser_overflowScroll.js]
 [browser_pageInfo.js]
 [browser_pageInfo_plugins.js]
 [browser_page_style_menu.js]
 [browser_pinnedTabs.js]
 [browser_plainTextLinks.js]
 [browser_pluginnotification.js]
deleted file mode 100644
--- a/browser/base/content/test/general/browser_notification_tab_switching.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-"use strict";
-
-let tab;
-let notification;
-let notificationURL = "http://example.org/browser/browser/base/content/test/general/file_dom_notifications.html";
-
-function test () {
-  waitForExplicitFinish();
-
-  let pm = Services.perms;
-  registerCleanupFunction(function() {
-    pm.remove(notificationURL, "desktop-notification");
-    gBrowser.removeTab(tab);
-    window.restore();
-  });
-
-  pm.add(makeURI(notificationURL), "desktop-notification", pm.ALLOW_ACTION);
-
-  tab = gBrowser.addTab(notificationURL);
-  tab.linkedBrowser.addEventListener("load", onLoad, true);
-}
-
-function onLoad() {
-  isnot(gBrowser.selectedTab, tab, "Notification page loaded as a background tab");
-  tab.linkedBrowser.removeEventListener("load", onLoad, true);
-  let win = tab.linkedBrowser.contentWindow.wrappedJSObject;
-  notification = win.showNotification();
-  notification.addEventListener("show", onAlertShowing);
-}
-
-function onAlertShowing() {
-  info("Notification alert showing");
-  notification.removeEventListener("show", onAlertShowing);
-
-  gBrowser.tabContainer.addEventListener("TabSelect", onTabSelect);
-  let alertWindow = findChromeWindowByURI("chrome://global/content/alerts/alert.xul");
-  if (!alertWindow) {
-    todo("Notifications don't use XUL windows on all platforms.");
-    notification.close();
-    finish();
-    return;
-  }
-  EventUtils.synthesizeMouseAtCenter(alertWindow.document.getElementById("alertTitleLabel"), {});
-  alertWindow.close();
-}
-
-function onTabSelect() {
-  gBrowser.tabContainer.removeEventListener("TabSelect", onTabSelect);
-  is(gBrowser.selectedTab.linkedBrowser.contentWindow.location.href, notificationURL,
-     "Notification tab should be selected.");
-
-  finish();
-}
deleted file mode 100644
--- a/browser/base/content/test/general/file_dom_notifications.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-<head>
-<script>
-"use strict";
-
-function showNotification() {
-  var options = {
-      dir: undefined,
-      lang: undefined,
-      body: "Test body",
-      tag: "Test tag",
-      icon: undefined,
-  };
-  return new Notification("Test title", options);
-}
-</script>
-</head>
-<body>
-<form id="notificationForm" onsubmit="showNotification();">
-  <input type="submit" value="Show notification" id="submit"/>
-</form>
-</body>
-</html>
--- a/dom/src/notification/Notification.cpp
+++ b/dom/src/notification/Notification.cpp
@@ -386,23 +386,16 @@ NotificationTask::Run()
 
 NS_IMPL_ISUPPORTS1(NotificationObserver, nsIObserver)
 
 NS_IMETHODIMP
 NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic,
                               const char16_t* aData)
 {
   if (!strcmp("alertclickcallback", aTopic)) {
-    nsCOMPtr<nsPIDOMWindow> window = mNotification->GetOwner();
-    nsIDocument* doc = window ? window->GetExtantDoc() : nullptr;
-    if (doc) {
-      nsContentUtils::DispatchChromeEvent(doc, window,
-                                          NS_LITERAL_STRING("DOMWebNotificationClicked"),
-                                          true, true);
-    }
     mNotification->DispatchTrustedEvent(NS_LITERAL_STRING("click"));
   } else if (!strcmp("alertfinished", aTopic)) {
     mNotification->mIsClosed = true;
     mNotification->DispatchTrustedEvent(NS_LITERAL_STRING("close"));
   } else if (!strcmp("alertshow", aTopic)) {
     mNotification->DispatchTrustedEvent(NS_LITERAL_STRING("show"));
   }