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: michael@0: // Adding the character encoding menu to the panel, exiting customize mode, michael@0: // and moving it to the nav-bar should have it enabled, not disabled. michael@0: add_task(function() { michael@0: yield startCustomizing(); michael@0: CustomizableUI.addWidgetToArea("characterencoding-button", "PanelUI-contents"); michael@0: yield endCustomizing(); michael@0: yield PanelUI.show(); michael@0: let panelHiddenPromise = promisePanelHidden(window); michael@0: PanelUI.hide(); michael@0: yield panelHiddenPromise; michael@0: CustomizableUI.addWidgetToArea("characterencoding-button", 'nav-bar'); michael@0: let button = document.getElementById("characterencoding-button"); michael@0: ok(!button.hasAttribute("disabled"), "Button shouldn't be disabled"); michael@0: }); michael@0: michael@0: add_task(function asyncCleanup() { michael@0: resetCustomization(); michael@0: }); michael@0: