Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | "use strict"; |
michael@0 | 6 | |
michael@0 | 7 | // Attempting to drag the menubar to the navbar shouldn't work. |
michael@0 | 8 | add_task(function() { |
michael@0 | 9 | yield startCustomizing(); |
michael@0 | 10 | let menuItems = document.getElementById("menubar-items"); |
michael@0 | 11 | let navbar = document.getElementById("nav-bar"); |
michael@0 | 12 | let menubar = document.getElementById("toolbar-menubar"); |
michael@0 | 13 | // Force the menu to be shown. |
michael@0 | 14 | const kAutohide = menubar.getAttribute("autohide"); |
michael@0 | 15 | menubar.setAttribute("autohide", "false"); |
michael@0 | 16 | simulateItemDrag(menuItems, navbar.customizationTarget); |
michael@0 | 17 | |
michael@0 | 18 | is(getAreaWidgetIds("nav-bar").indexOf("menubar-items"), -1, "Menu bar shouldn't be in the navbar."); |
michael@0 | 19 | ok(!navbar.querySelector("#menubar-items"), "Shouldn't find menubar items in the navbar."); |
michael@0 | 20 | ok(menubar.querySelector("#menubar-items"), "Should find menubar items in the menubar."); |
michael@0 | 21 | isnot(getAreaWidgetIds("toolbar-menubar").indexOf("menubar-items"), -1, |
michael@0 | 22 | "Menubar items shouldn't be missing from the navbar."); |
michael@0 | 23 | menubar.setAttribute("autohide", kAutohide); |
michael@0 | 24 | yield endCustomizing(); |
michael@0 | 25 | }); |
michael@0 | 26 | |
michael@0 | 27 | add_task(function asyncCleanup() { |
michael@0 | 28 | yield endCustomizing(); |
michael@0 | 29 | yield resetCustomization(); |
michael@0 | 30 | }); |