browser/components/customizableui/test/browser_938995_indefaultstate_nonremovable.js

Thu, 15 Jan 2015 21:13:52 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:13:52 +0100
branch
TOR_BUG_9701
changeset 12
7540298fafa1
permissions
-rw-r--r--

Remove forgotten relic of ABI crash risk averse overloaded method change.

     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 const kWidgetId = "test-non-removable-widget";
     9 // Adding non-removable items to a toolbar or the panel shouldn't change inDefaultState
    10 add_task(function() {
    11   let navbar = document.getElementById("nav-bar");
    12   ok(CustomizableUI.inDefaultState, "Should start in default state");
    14   let button = createDummyXULButton(kWidgetId, "Test non-removable inDefaultState handling");
    15   CustomizableUI.addWidgetToArea(kWidgetId, CustomizableUI.AREA_NAVBAR);
    16   button.setAttribute("removable", "false");
    17   ok(CustomizableUI.inDefaultState, "Should still be in default state after navbar addition");
    18   button.remove();
    20   button = createDummyXULButton(kWidgetId, "Test non-removable inDefaultState handling");
    21   CustomizableUI.addWidgetToArea(kWidgetId, CustomizableUI.AREA_PANEL);
    22   button.setAttribute("removable", "false");
    23   ok(CustomizableUI.inDefaultState, "Should still be in default state after panel addition");
    24   button.remove();
    25   ok(CustomizableUI.inDefaultState, "Should be in default state after destroying both widgets");
    26 });

mercurial