Backed out changeset a9fb56b87d01 (bug 1348396) for frequent customizableui browser_panelUINotifications.js failures
authorIris Hsiao <ihsiao@mozilla.com>
Wed, 12 Apr 2017 18:07:29 +0800
changeset 352554 bc086e9044e6
parent 352553 e0f7a279c708
child 352555 201b18586b84
child 352745 fac2c174087f
push id40577
push userihsiao@mozilla.com
push dateWed, 12 Apr 2017 10:07:42 +0000
treeherderautoland@bc086e9044e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1348396
milestone55.0a1
backs outa9fb56b87d01
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 changeset a9fb56b87d01 (bug 1348396) for frequent customizableui browser_panelUINotifications.js failures
browser/components/customizableui/content/panelUI.js
browser/components/customizableui/test/browser_panelUINotifications.js
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -680,24 +680,18 @@ const PanelUI = {
       // since we don't want their doorhangers competing for attention
       doorhangers.forEach(n => { n.dismissed = true; })
       this._hidePopup();
       this._clearBadge();
       if (!this.notifications[0].options.badgeOnly) {
         this._showMenuItem(this.notifications[0]);
       }
     } else if (doorhangers.length > 0) {
-      if (window.fullScreen) {
-        this._hidePopup();
-        this._showBadge(doorhangers[0]);
-        this._showMenuItem(doorhangers[0]);
-      } else {
-        this._clearBadge();
-        this._showNotificationPanel(doorhangers[0]);
-      }
+      this._clearBadge();
+      this._showNotificationPanel(doorhangers[0]);
     } else {
       this._hidePopup();
       this._showBadge(this.notifications[0]);
       this._showMenuItem(this.notifications[0]);
     }
   },
 
   _showNotificationPanel(notification) {
--- a/browser/components/customizableui/test/browser_panelUINotifications.js
+++ b/browser/components/customizableui/test/browser_panelUINotifications.js
@@ -298,45 +298,8 @@ add_task(function* testMultipleNonBadges
     isnot(PanelUI.menuButton.getAttribute("badge-status"), "update-manual", "update-manual badge is hidden on PanelUI button.");
     menuItem = doc.getElementById("PanelUI-update-manual-menu-item");
     is(menuItem.hidden, false, "update-manual menu item is showing.");
 
     menuItem.click();
     ok(updateManualAction.called, "update-manual main action callback was called");
   });
 });
-
-add_task(function* testFullscreen() {
-  let doc = document;
-
-  is(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is closed.");
-  let mainActionCalled = false;
-  let mainAction = {
-    callback: () => { mainActionCalled = true; }
-  };
-  PanelUI.showNotification("update-manual", mainAction);
-
-  isnot(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is showing.");
-  let notifications = [...PanelUI.notificationPanel.children].filter(n => !n.hidden);
-  is(notifications.length, 1, "PanelUI doorhanger is only displaying one notification.");
-  let doorhanger = notifications[0];
-  is(doorhanger.id, "PanelUI-update-manual-notification", "PanelUI is displaying the update-manual notification.");
-
-  let popuphiddenPromise = BrowserTestUtils.waitForEvent(PanelUI.notificationPanel, "popuphidden");
-  EventUtils.synthesizeKey("VK_F11", {});
-  yield popuphiddenPromise;
-  is(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is closed.");
-
-  window.FullScreen.showNavToolbox();
-  is(PanelUI.menuButton.getAttribute("badge-status"), "update-manual", "Badge is displaying on PanelUI button.");
-
-  let popupshownPromise = BrowserTestUtils.waitForEvent(PanelUI.notificationPanel, "popupshown");
-  EventUtils.synthesizeKey("VK_F11", {});
-  yield popupshownPromise;
-  isnot(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is showing.");
-  isnot(PanelUI.menuButton.getAttribute("badge-status"), "update-manual", "Badge is not displaying on PanelUI button.");
-
-  let mainActionButton = doc.getAnonymousElementByAttribute(doorhanger, "anonid", "button");
-  mainActionButton.click();
-  ok(mainActionCalled, "Main action callback was called");
-  is(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is closed.");
-  is(PanelUI.menuButton.hasAttribute("badge-status"), false, "Should not have a badge status");
-});