michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: // Attempting to drag the menubar to the navbar shouldn't work. michael@0: add_task(function() { michael@0: yield startCustomizing(); michael@0: let menuItems = document.getElementById("menubar-items"); michael@0: let navbar = document.getElementById("nav-bar"); michael@0: let menubar = document.getElementById("toolbar-menubar"); michael@0: // Force the menu to be shown. michael@0: const kAutohide = menubar.getAttribute("autohide"); michael@0: menubar.setAttribute("autohide", "false"); michael@0: simulateItemDrag(menuItems, navbar.customizationTarget); michael@0: michael@0: is(getAreaWidgetIds("nav-bar").indexOf("menubar-items"), -1, "Menu bar shouldn't be in the navbar."); michael@0: ok(!navbar.querySelector("#menubar-items"), "Shouldn't find menubar items in the navbar."); michael@0: ok(menubar.querySelector("#menubar-items"), "Should find menubar items in the menubar."); michael@0: isnot(getAreaWidgetIds("toolbar-menubar").indexOf("menubar-items"), -1, michael@0: "Menubar items shouldn't be missing from the navbar."); michael@0: menubar.setAttribute("autohide", kAutohide); michael@0: yield endCustomizing(); michael@0: }); michael@0: michael@0: add_task(function asyncCleanup() { michael@0: yield endCustomizing(); michael@0: yield resetCustomization(); michael@0: });