Bug 712624 - Bustage fix for permanent orange in test-autohide-menubar.js on Windows for CLOSED TREE. r=sid0.
--- 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, {});
}
}
/**