summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_987640_charEncoding.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
commit8148615da179fdd60f19018e13b4e94b95609cc6 (patch)
tree771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/components/customizableui/test/browser_987640_charEncoding.js
parent494802c1be7888025b95260d23db187467d2b9dd (diff)
downloadUXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/components/customizableui/test/browser_987640_charEncoding.js')
-rw-r--r--browser/components/customizableui/test/browser_987640_charEncoding.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/browser/components/customizableui/test/browser_987640_charEncoding.js b/browser/components/customizableui/test/browser_987640_charEncoding.js
deleted file mode 100644
index dfe02f940..000000000
--- a/browser/components/customizableui/test/browser_987640_charEncoding.js
+++ /dev/null
@@ -1,60 +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 TEST_PAGE = "http://mochi.test:8888/browser/browser/components/customizableui/test/support/test_967000_charEncoding_page.html";
-
-add_task(function*() {
- info("Check Character Encoding panel functionality");
-
- // add the Character Encoding button to the panel
- CustomizableUI.addWidgetToArea("characterencoding-button",
- CustomizableUI.AREA_PANEL);
-
- let newTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PAGE, true, true);
-
- yield PanelUI.show();
- let charEncodingButton = document.getElementById("characterencoding-button");
- let characterEncodingView = document.getElementById("PanelUI-characterEncodingView");
- let subviewShownPromise = subviewShown(characterEncodingView);
- charEncodingButton.click();
- yield subviewShownPromise;
-
- let checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']");
- let initialEncoding = checkedButtons[0];
- is(initialEncoding.getAttribute("label"), "Unicode", "The unicode encoding is initially selected");
-
- // change the encoding
- let encodings = characterEncodingView.querySelectorAll("toolbarbutton");
- let newEncoding = encodings[0].hasAttribute("checked") ? encodings[1] : encodings[0];
- let tabLoadPromise = promiseTabLoadEvent(gBrowser.selectedTab, TEST_PAGE);
- newEncoding.click();
- yield tabLoadPromise;
-
- // check that the new encodng is applied
- yield PanelUI.show();
- charEncodingButton.click();
- checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']");
- let selectedEncodingName = checkedButtons[0].getAttribute("label");
- ok(selectedEncodingName != "Unicode", "The encoding was changed to " + selectedEncodingName);
-
- // reset the initial encoding
- yield PanelUI.show();
- charEncodingButton.click();
- tabLoadPromise = promiseTabLoadEvent(gBrowser.selectedTab, TEST_PAGE);
- initialEncoding.click();
- yield tabLoadPromise;
- yield PanelUI.show();
- charEncodingButton.click();
- checkedButtons = characterEncodingView.querySelectorAll("toolbarbutton[checked='true']");
- is(checkedButtons[0].getAttribute("label"), "Unicode", "The encoding was reset to Unicode");
- yield BrowserTestUtils.removeTab(newTab);
-});
-
-add_task(function* asyncCleanup() {
- // reset the panel to the default state
- yield resetCustomization();
- ok(CustomizableUI.inDefaultState, "The UI is in default state again.");
-});