Backed out changeset 7476bb2b8e9c (bug 945191)
authorMike Conley <mconley@mozilla.com>
Wed, 04 Dec 2013 17:14:38 -0500
changeset 173409 29ddc08281ff12b19233a2e5c33b64bed90a7861
parent 173408 526e12792fc80c1de249d0e97bd0ddc16aaa43de
child 173410 7de6a7ee1fc2be5e1cf2dd2aae2c140db2e6d350
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 out7476bb2b8e9cbaafe538a763fdea90b490a1ea16
Backed out changeset 7476bb2b8e9c (bug 945191)
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) {