browser/components/customizableui/test/browser_969661_character_encoding_navbar_disabled.js

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 "use strict";
     8 // Adding the character encoding menu to the panel, exiting customize mode,
     9 // and moving it to the nav-bar should have it enabled, not disabled.
    10 add_task(function() {
    11   yield startCustomizing();
    12   CustomizableUI.addWidgetToArea("characterencoding-button", "PanelUI-contents");
    13   yield endCustomizing();
    14   yield PanelUI.show();
    15   let panelHiddenPromise = promisePanelHidden(window);
    16   PanelUI.hide();
    17   yield panelHiddenPromise;
    18   CustomizableUI.addWidgetToArea("characterencoding-button", 'nav-bar');
    19   let button = document.getElementById("characterencoding-button");
    20   ok(!button.hasAttribute("disabled"), "Button shouldn't be disabled");
    21 });
    23 add_task(function asyncCleanup() {
    24   resetCustomization();
    25 });

mercurial