diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-25 15:07:00 -0500 |
commit | 0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch) | |
tree | d408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/addoncompat/tests/browser | |
parent | 20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff) | |
download | UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip |
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/addoncompat/tests/browser')
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/.eslintrc.js | 7 | ||||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/addon.xpi | bin | 10761 -> 0 bytes | |||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/browser.ini | 9 | ||||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/browser_addonShims.js | 67 | ||||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html | 17 | ||||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html | 16 | ||||
-rw-r--r-- | toolkit/components/addoncompat/tests/browser/compat-addon.xpi | bin | 5692 -> 0 bytes |
7 files changed, 0 insertions, 116 deletions
diff --git a/toolkit/components/addoncompat/tests/browser/.eslintrc.js b/toolkit/components/addoncompat/tests/browser/.eslintrc.js deleted file mode 100644 index 7c8021192..000000000 --- a/toolkit/components/addoncompat/tests/browser/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = { - "extends": [ - "../../../../../testing/mochitest/browser.eslintrc.js" - ] -}; diff --git a/toolkit/components/addoncompat/tests/browser/addon.xpi b/toolkit/components/addoncompat/tests/browser/addon.xpi Binary files differdeleted file mode 100644 index e6392fb40..000000000 --- a/toolkit/components/addoncompat/tests/browser/addon.xpi +++ /dev/null diff --git a/toolkit/components/addoncompat/tests/browser/browser.ini b/toolkit/components/addoncompat/tests/browser/browser.ini deleted file mode 100644 index 7c8547562..000000000 --- a/toolkit/components/addoncompat/tests/browser/browser.ini +++ /dev/null @@ -1,9 +0,0 @@ -[DEFAULT] -tags = addons -support-files = - addon.xpi - browser_addonShims_testpage.html - browser_addonShims_testpage2.html - compat-addon.xpi - -[browser_addonShims.js] diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js deleted file mode 100644 index b642eb3cb..000000000 --- a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js +++ /dev/null @@ -1,67 +0,0 @@ -var {AddonManager} = Cu.import("resource://gre/modules/AddonManager.jsm", {}); -var {Services} = Cu.import("resource://gre/modules/Services.jsm", {}); - -const ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/addon.xpi"; -const COMPAT_ADDON_URL = "http://example.com/browser/toolkit/components/addoncompat/tests/browser/compat-addon.xpi"; - -// Install a test add-on that will exercise e10s shims. -// url: Location of the add-on. -function addAddon(url) -{ - info("Installing add-on: " + url); - - return new Promise(function(resolve, reject) { - AddonManager.getInstallForURL(url, installer => { - installer.install(); - let listener = { - onInstallEnded: function(addon, addonInstall) { - installer.removeListener(listener); - - // Wait for add-on's startup scripts to execute. See bug 997408 - executeSoon(function() { - resolve(addonInstall); - }); - } - }; - installer.addListener(listener); - }, "application/x-xpinstall"); - }); -} - -// Uninstall a test add-on. -// addon: The addon reference returned from addAddon. -function removeAddon(addon) -{ - info("Removing addon."); - - return new Promise(function(resolve, reject) { - let listener = { - onUninstalled: function(uninstalledAddon) { - if (uninstalledAddon != addon) { - return; - } - AddonManager.removeAddonListener(listener); - resolve(); - } - }; - AddonManager.addAddonListener(listener); - addon.uninstall(); - }); -} - -add_task(function* test_addon_shims() { - yield new Promise(resolve => { - SpecialPowers.pushPrefEnv({set: [["dom.ipc.shims.enabledWarnings", true]]}, - resolve); - }); - - let addon = yield addAddon(ADDON_URL); - yield window.runAddonShimTests({ok: ok, is: is, info: info}); - yield removeAddon(addon); - - if (Services.appinfo.browserTabsRemoteAutostart) { - addon = yield addAddon(COMPAT_ADDON_URL); - yield window.runAddonTests({ok: ok, is: is, info: info}); - yield removeAddon(addon); - } -}); diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html b/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html deleted file mode 100644 index 5a8b34e88..000000000 --- a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage.html +++ /dev/null @@ -1,17 +0,0 @@ -<html> -<head> - <meta charset="utf-8"> - <title>shim test</title> -</head> - -<body> -Hello! - -<a href="browser_addonShims_testpage2.html" id="link">Link</a> -<div id="output"></div> - -<script type="text/javascript"> -var global = 3; -</script> -</body> -</html> diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html b/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html deleted file mode 100644 index f644b1129..000000000 --- a/toolkit/components/addoncompat/tests/browser/browser_addonShims_testpage2.html +++ /dev/null @@ -1,16 +0,0 @@ -<html> -<head> - <meta charset="utf-8"> - <title>shim test</title> -</head> - -<body> -Hello! - -<a href="browser_addonShims_testpage.html" id="link">Link</a> - -<script type="text/javascript"> -var global = 5; -</script> -</body> -</html> diff --git a/toolkit/components/addoncompat/tests/browser/compat-addon.xpi b/toolkit/components/addoncompat/tests/browser/compat-addon.xpi Binary files differdeleted file mode 100644 index c7ca32cdc..000000000 --- a/toolkit/components/addoncompat/tests/browser/compat-addon.xpi +++ /dev/null |