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: const kWidgetId = "test-892956-destroyWidget-defaultPlacement"; michael@0: michael@0: // destroyWidget should clean up defaultPlacements if the widget had a defaultArea michael@0: add_task(function() { michael@0: ok(CustomizableUI.inDefaultState, "Should be in the default state when we start"); michael@0: michael@0: let widgetSpec = { michael@0: id: kWidgetId, michael@0: defaultArea: CustomizableUI.AREA_NAVBAR michael@0: }; michael@0: CustomizableUI.createWidget(widgetSpec); michael@0: CustomizableUI.destroyWidget(kWidgetId); michael@0: ok(CustomizableUI.inDefaultState, "Should be in the default state when we finish"); michael@0: }); michael@0: michael@0: add_task(function asyncCleanup() { michael@0: yield resetCustomization(); michael@0: });