summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/browser/browser_bug577990.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
commitfc61780b35af913801d72086456f493f63197da6 (patch)
treef85891288a7bd988da9f0f15ae64e5c63f00d493 /toolkit/mozapps/extensions/test/browser/browser_bug577990.js
parent69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff)
parent50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff)
downloadUXP-fc61780b35af913801d72086456f493f63197da6.tar
UXP-fc61780b35af913801d72086456f493f63197da6.tar.gz
UXP-fc61780b35af913801d72086456f493f63197da6.tar.lz
UXP-fc61780b35af913801d72086456f493f63197da6.tar.xz
UXP-fc61780b35af913801d72086456f493f63197da6.zip
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts: # browser/app/profile/firefox.js # browser/components/preferences/jar.mn
Diffstat (limited to 'toolkit/mozapps/extensions/test/browser/browser_bug577990.js')
-rw-r--r--toolkit/mozapps/extensions/test/browser/browser_bug577990.js132
1 files changed, 0 insertions, 132 deletions
diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug577990.js b/toolkit/mozapps/extensions/test/browser/browser_bug577990.js
deleted file mode 100644
index 2c3c7ba5a..000000000
--- a/toolkit/mozapps/extensions/test/browser/browser_bug577990.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Tests that the visible delay in showing the "Language" category occurs
-// very minimally
-
-var gManagerWindow;
-var gCategoryUtilities;
-var gProvider;
-var gInstall;
-var gInstallProperties = [{
- name: "Locale Category Test",
- type: "locale"
-}];
-
-function test() {
- try {
- if (Components.classes["@mozilla.org/gfx/info;1"].getService(Components.interfaces.nsIGfxInfo).D2DEnabled) {
- requestLongerTimeout(2);
- }
- } catch(e) {}
- waitForExplicitFinish();
-
- gProvider = new MockProvider();
-
- open_manager("addons://list/extension", function(aWindow) {
- gManagerWindow = aWindow;
- gCategoryUtilities = new CategoryUtilities(gManagerWindow);
- run_next_test();
- });
-}
-
-function end_test() {
- close_manager(gManagerWindow, finish);
-}
-
-function install_locale(aCallback) {
- gInstall = gProvider.createInstalls(gInstallProperties)[0];
- gInstall.addTestListener({
- onInstallEnded: function(aInstall) {
- gInstall.removeTestListener(this);
- executeSoon(aCallback);
- }
- });
- gInstall.install();
-}
-
-function check_hidden(aExpectedHidden) {
- var hidden = !gCategoryUtilities.isTypeVisible("locale");
- is(hidden, !!aExpectedHidden, "Should have correct hidden state");
-}
-
-function run_open_test(aTestSetup, aLoadHidden, aInitializedHidden, aSelected) {
- function loadCallback(aManagerWindow) {
- gManagerWindow = aManagerWindow;
- gCategoryUtilities = new CategoryUtilities(gManagerWindow);
- check_hidden(aLoadHidden);
- }
-
- function run() {
- open_manager(null, function() {
- check_hidden(aInitializedHidden);
- var selected = (gCategoryUtilities.selectedCategory == "locale");
- is(selected, !!aSelected, "Should have correct selected state");
-
- run_next_test();
- }, loadCallback);
- }
-
- close_manager(gManagerWindow, function() {
- // Allow for asynchronous functions to run before the manager opens
- aTestSetup ? aTestSetup(run) : run();
- });
-}
-
-
-// Tests that the locale category is hidden when there are no locales installed
-add_test(function() {
- run_open_test(null, true, true);
-});
-
-// Tests that installing a locale while the Add-on Manager is open shows the
-// locale category
-add_test(function() {
- check_hidden(true);
- install_locale(function() {
- check_hidden(false);
- run_next_test();
- });
-});
-
-// Tests that the locale category is shown with no delay when restarting
-// Add-on Manager
-add_test(function() {
- run_open_test(null, false, false);
-});
-
-// Tests that cancelling the locale install and restarting the Add-on Manager
-// causes the locale category to be hidden with an acceptable delay
-add_test(function() {
- gInstall.cancel();
- run_open_test(null, false, true)
-});
-
-// Tests that the locale category is hidden with no delay when restarting
-// Add-on Manager
-add_test(function() {
- run_open_test(null, true, true);
-});
-
-// Tests that installing a locale when the Add-on Manager is closed, and then
-// opening the Add-on Manager causes the locale category to be shown with an
-// acceptable delay
-add_test(function() {
- run_open_test(install_locale, true, false);
-});
-
-// Tests that selection of the locale category persists
-add_test(function() {
- gCategoryUtilities.openType("locale", function() {
- run_open_test(null, false, false, true);
- });
-});
-
-// Tests that cancelling the locale install and restarting the Add-on Manager
-// causes the locale category to be hidden and not selected
-add_test(function() {
- gInstall.cancel();
- run_open_test(null, false, true);
-});
-