Bug 712624 - Bustage fix for permanent orange in test-autohide-menubar.js on Windows for CLOSED TREE. r=sid0.
authorMike Conley <mconley@mozilla.com>
Wed, 21 Dec 2011 11:25:18 -0500
changeset 10270 3118433d580820da58a918339fe8039b50786f00
parent 10269 2f1324b63fd77753b3bcc80b3a3b0b5f214f0e7b
child 10271 07d03fadd4ea351085f583ef916662343f4e2332
push id402
push userbugzilla@standard8.plus.com
push dateTue, 13 Mar 2012 21:17:18 +0000
treeherdercomm-beta@d080a8ebf16a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssid0
bugs712624
Bug 712624 - Bustage fix for permanent orange in test-autohide-menubar.js on Windows for CLOSED TREE. r=sid0.
mail/base/content/mailCore.js
mail/test/mozmill/message-window/test-autohide-menubar.js
--- a/mail/base/content/mailCore.js
+++ b/mail/base/content/mailCore.js
@@ -300,16 +300,17 @@ function onViewToolbarsPopupShowing(aEve
       if (toolbarName) {
         let menuItem = document.createElement("menuitem");
         let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
                               "autohide" : "collapsed";
         menuItem.setAttribute("type", "checkbox");
         // Mark this menuitem with an iscollapsible attribute, so we
         // know we can wipe it out later on.
         menuItem.setAttribute("iscollapsible", true);
+        menuItem.setAttribute("toolbarid", toolbar.id);
         menuItem.setAttribute("label", toolbarName);
         menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));
         menuItem.setAttribute("checked",
                               toolbar.getAttribute(hidingAttribute) != "true");
         popup.insertBefore(menuItem, firstMenuItem);
 
         let onMenuItemCommand = function(aEvent) {
           let hidden = aEvent.originalTarget.getAttribute("checked") != "true";
--- a/mail/test/mozmill/message-window/test-autohide-menubar.js
+++ b/mail/test/mozmill/message-window/test-autohide-menubar.js
@@ -67,17 +67,17 @@ function setupModule(module) {
  *
  * @param controller the mozmill controller for the window
  * @param elem the element to click on (usually the menubar)
  * @param hide true to hide, false otherwise
  */
 function set_autohide_menubar(controller, elem, hide) {
   let contextMenu = controller.getMenu("#toolbar-context-menu");
   contextMenu.open(new elib.Elem(elem));
-  let menuitem = contextMenu.getItem("menuitem[toolbarindex='0']");
+  let menuitem = contextMenu.getItem('menuitem[toolbarid="' + elem.id + '"]');
   if (menuitem.getNode().hasAttribute("checked") == hide) {
     // XXX Hack around the fact that calling click doesn't toggle the checked
     // state (bug 670829, bug 670830).
     controller.mouseEvent(menuitem, undefined, undefined, {});
   }
 }
 
 /**