browser/components/customizableui/test/browser_892956_destroyWidget_defaultPlacements.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/customizableui/test/browser_892956_destroyWidget_defaultPlacements.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     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 +const kWidgetId = "test-892956-destroyWidget-defaultPlacement";
    1.11 +
    1.12 +// destroyWidget should clean up defaultPlacements if the widget had a defaultArea
    1.13 +add_task(function() {
    1.14 +  ok(CustomizableUI.inDefaultState, "Should be in the default state when we start");
    1.15 +
    1.16 +  let widgetSpec = {
    1.17 +    id: kWidgetId,
    1.18 +    defaultArea: CustomizableUI.AREA_NAVBAR
    1.19 +  };
    1.20 +  CustomizableUI.createWidget(widgetSpec);
    1.21 +  CustomizableUI.destroyWidget(kWidgetId);
    1.22 +  ok(CustomizableUI.inDefaultState, "Should be in the default state when we finish");
    1.23 +});
    1.24 +
    1.25 +add_task(function asyncCleanup() {
    1.26 +  yield resetCustomization();
    1.27 +});

mercurial