browser/components/customizableui/test/browser_877447_skip_missing_ids.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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";
     7 registerCleanupFunction(removeCustomToolbars);
     9 add_task(function skipMissingIDS() {
    10   const kButtonId = "look-at-me-disappear-button";
    11   CustomizableUI.reset();
    12   ok(CustomizableUI.inDefaultState, "Should be in the default state.");
    13   let btn = createDummyXULButton(kButtonId, "Gone!");
    14   CustomizableUI.addWidgetToArea(kButtonId, CustomizableUI.AREA_NAVBAR);
    15   ok(!CustomizableUI.inDefaultState, "Should no longer be in the default state.");
    16   is(btn.parentNode.parentNode.id, CustomizableUI.AREA_NAVBAR, "Button should be in navbar");
    17   btn.remove();
    18   is(btn.parentNode, null, "Button is no longer in the navbar");
    19   ok(CustomizableUI.inDefaultState, "Should be back in the default state, " +
    20                                     "despite unknown button ID in placements.");
    21 });
    23 add_task(function asyncCleanup() {
    24   yield resetCustomization();
    25 });

mercurial