summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js')
-rw-r--r--browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js b/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
deleted file mode 100644
index fc05a99fd..000000000
--- a/browser/components/customizableui/test/browser_952963_areaType_getter_no_area.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const kToolbarName = "test-unregisterArea-areaType";
-const kUnregisterAreaTestWidget = "test-widget-for-unregisterArea-areaType";
-const kTestWidget = "test-widget-no-area-areaType";
-registerCleanupFunction(removeCustomToolbars);
-
-function checkAreaType(widget) {
- try {
- is(widget.areaType, null, "areaType should be null");
- } catch (ex) {
- info("Fetching areaType threw: " + ex);
- ok(false, "areaType getter shouldn't throw.");
- }
-}
-
-// widget wrappers in unregisterArea'd areas and nowhere shouldn't throw when checking areaTypes.
-add_task(function*() {
- // Using the ID before it's been created will imply a XUL wrapper; we'll test
- // an API-based wrapper below
- let toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]);
- CustomizableUI.unregisterArea(kToolbarName);
- toolbarNode.remove();
-
- let w = CustomizableUI.getWidget(kUnregisterAreaTestWidget);
- checkAreaType(w);
-
- w = CustomizableUI.getWidget(kTestWidget);
- checkAreaType(w);
-
- let spec = {id: kUnregisterAreaTestWidget, type: 'button', removable: true,
- label: "areaType test", tooltiptext: "areaType test"};
- CustomizableUI.createWidget(spec);
- toolbarNode = createToolbarWithPlacements(kToolbarName, [kUnregisterAreaTestWidget]);
- CustomizableUI.unregisterArea(kToolbarName);
- toolbarNode.remove();
- w = CustomizableUI.getWidget(spec.id);
- checkAreaType(w);
- CustomizableUI.removeWidgetFromArea(kUnregisterAreaTestWidget);
- checkAreaType(w);
- // XXXgijs: ensure cleanup function doesn't barf:
- gAddedToolbars.delete(kToolbarName);
-});
-
-add_task(function* asyncCleanup() {
- yield resetCustomization();
-});
-