1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/components/customizableui/test/browser_969661_character_encoding_navbar_disabled.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 + 1.11 +// Adding the character encoding menu to the panel, exiting customize mode, 1.12 +// and moving it to the nav-bar should have it enabled, not disabled. 1.13 +add_task(function() { 1.14 + yield startCustomizing(); 1.15 + CustomizableUI.addWidgetToArea("characterencoding-button", "PanelUI-contents"); 1.16 + yield endCustomizing(); 1.17 + yield PanelUI.show(); 1.18 + let panelHiddenPromise = promisePanelHidden(window); 1.19 + PanelUI.hide(); 1.20 + yield panelHiddenPromise; 1.21 + CustomizableUI.addWidgetToArea("characterencoding-button", 'nav-bar'); 1.22 + let button = document.getElementById("characterencoding-button"); 1.23 + ok(!button.hasAttribute("disabled"), "Button shouldn't be disabled"); 1.24 +}); 1.25 + 1.26 +add_task(function asyncCleanup() { 1.27 + resetCustomization(); 1.28 +}); 1.29 +