summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/webextensions/test/browser/browser_bug608316.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-06-26 16:09:08 -0400
commiteda567b364a06e9e63efb865a6b1c73f1cb5232e (patch)
tree912ab15d877f733318e2c0394713bca33b830547 /toolkit/mozapps/webextensions/test/browser/browser_bug608316.js
parent80eb356d57fc310cdf812cae63de30d6e56c1788 (diff)
downloadUXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.gz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.lz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.tar.xz
UXP-eda567b364a06e9e63efb865a6b1c73f1cb5232e.zip
[AllAM] Remove Mozilla Tests
Diffstat (limited to 'toolkit/mozapps/webextensions/test/browser/browser_bug608316.js')
-rw-r--r--toolkit/mozapps/webextensions/test/browser/browser_bug608316.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/toolkit/mozapps/webextensions/test/browser/browser_bug608316.js b/toolkit/mozapps/webextensions/test/browser/browser_bug608316.js
deleted file mode 100644
index 72bb61f49..000000000
--- a/toolkit/mozapps/webextensions/test/browser/browser_bug608316.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// Bug 608316 - Test that cancelling an uninstall during the onUninstalling
-// event doesn't confuse the UI
-
-var gProvider;
-
-function test() {
- waitForExplicitFinish();
-
- gProvider = new MockProvider();
-
- gProvider.createAddons([{
- id: "addon1@tests.mozilla.org",
- name: "addon 1",
- version: "1.0"
- }]);
-
- run_next_test();
-}
-
-
-function end_test() {
- finish();
-}
-
-
-add_test(function() {
- var sawUninstall = false;
- var listener = {
- onUninstalling: function(aAddon, aRestartRequired) {
- if (aAddon.id != "addon1@tests.mozilla.org")
- return;
- sawUninstall = true;
- aAddon.cancelUninstall();
- }
- }
-
- // Important to add this before opening the UI so it gets its events first
- AddonManager.addAddonListener(listener);
- registerCleanupFunction(function() {
- AddonManager.removeAddonListener(listener);
- });
-
- open_manager("addons://list/extension", function(aManager) {
- var addon = get_addon_element(aManager, "addon1@tests.mozilla.org");
- isnot(addon, null, "Should see the add-on in the list");
-
- var removeBtn = aManager.document.getAnonymousElementByAttribute(addon, "anonid", "remove-btn");
- EventUtils.synthesizeMouseAtCenter(removeBtn, { }, aManager);
-
- ok(sawUninstall, "Should have seen the uninstall event");
- sawUninstall = false;
-
- is(addon.getAttribute("pending"), "", "Add-on should not be uninstalling");
-
- close_manager(aManager, function() {
- ok(!sawUninstall, "Should not have seen another uninstall event");
-
- run_next_test();
- });
- });
-});