Backed out changeset d5a62078b4f2 (bug 945191) for commit msg without 'Australis'
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 04 Dec 2013 10:59:43 +0100
changeset 173404 e55e2e773ae677155175e56e8765eae2086f9e80
parent 173402 9688476c1544689573c7d3ef805fd61c2fc0f631
child 173405 7476bb2b8e9cbaafe538a763fdea90b490a1ea16
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs945191
milestone28.0a1
backs outd5a62078b4f2b3f93a0b158e1b66c8b109c64aab
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 d5a62078b4f2 (bug 945191) for commit msg without 'Australis'
browser/components/customizableui/src/CustomizeMode.jsm
browser/components/customizableui/test/browser_880164_customization_context_menus.js
--- a/browser/components/customizableui/src/CustomizeMode.jsm
+++ b/browser/components/customizableui/src/CustomizeMode.jsm
@@ -553,24 +553,20 @@ CustomizeMode.prototype = {
                                 aNode.getAttribute("contextmenu") ? "contextmenu" : "";
     let currentContextMenu = aNode.getAttribute(contextMenuAttrName);
     let contextMenuForPlace = aPlace == "panel" ?
                                 kPanelItemContextMenu :
                                 kPaletteItemContextMenu;
     if (aPlace != "toolbar") {
       wrapper.setAttribute("context", contextMenuForPlace);
     }
-    // Only keep track of the menu if it is non-default.
-    if (currentContextMenu &&
-        currentContextMenu != contextMenuForPlace) {
+    if (currentContextMenu) {
       aNode.setAttribute("wrapped-context", currentContextMenu);
       aNode.setAttribute("wrapped-contextAttrName", contextMenuAttrName)
       aNode.removeAttribute(contextMenuAttrName);
-    } else if (currentContextMenu == contextMenuForPlace) {
-      aNode.removeAttribute(contextMenuAttrName);
     }
 
     wrapper.addEventListener("mousedown", this);
     wrapper.addEventListener("mouseup", this);
 
     return wrapper;
   },
 
--- a/browser/components/customizableui/test/browser_880164_customization_context_menus.js
+++ b/browser/components/customizableui/test/browser_880164_customization_context_menus.js
@@ -236,61 +236,16 @@ let gTests = [
       yield hiddenContextPromise;
     },
     teardown: function() {
       yield endCustomizing(this.otherWin);
       this.otherWin.close();
       this.otherWin = null;
     }
   },
-  {
-    desc: "Bug 945191 - Combined buttons show wrong context menu options when they are in the toolbar.",
-    setup: startCustomizing,
-    run: function () {
-      let contextMenu = document.getElementById("customizationPanelItemContextMenu");
-      let shownPromise = contextMenuShown(contextMenu);
-      let zoomControls = document.getElementById("wrapper-zoom-controls");
-      EventUtils.synthesizeMouse(zoomControls, 2, 2, {type: "contextmenu", button: 2});
-      yield shownPromise;
-      // Execute the command to move the item from the panel to the toolbar.
-      contextMenu.childNodes[0].doCommand();
-      let hiddenPromise = contextMenuHidden(contextMenu);
-      contextMenu.hidePopup();
-      yield hiddenPromise;
-      yield endCustomizing();
-
-      zoomControls = document.getElementById("zoom-controls");
-      is(zoomControls.parentNode.id, "nav-bar-customization-target", "Zoom-controls should be on the nav-bar");
-
-      contextMenu = document.getElementById("toolbar-context-menu");
-      shownPromise = contextMenuShown(contextMenu);
-      EventUtils.synthesizeMouse(zoomControls, 2, 2, {type: "contextmenu", button: 2});
-      yield shownPromise;
-
-      let expectedEntries = [
-        [".customize-context-addToPanel", true],
-        [".customize-context-removeFromToolbar", true],
-        ["---"]
-      ];
-      if (!isOSX) {
-        expectedEntries.push(["#toggle_toolbar-menubar", true]);
-      }
-      expectedEntries.push(
-        ["#toggle_PersonalToolbar", true],
-        ["---"],
-        [".viewCustomizeToolbar", true]
-      );
-      checkContextMenu(contextMenu, expectedEntries);
-
-      hiddenPromise = contextMenuHidden(contextMenu);
-      contextMenu.hidePopup();
-      yield hiddenPromise;
-    },
-    teardown: resetCustomization,
-  }
 ];
 
 function test() {
   waitForExplicitFinish();
   runTests(gTests);
 }
 
 function contextMenuShown(aContextMenu) {