summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/webextensions/test/xpcshell/test_install_icons.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/xpcshell/test_install_icons.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/xpcshell/test_install_icons.js')
-rw-r--r--toolkit/mozapps/webextensions/test/xpcshell/test_install_icons.js61
1 files changed, 0 insertions, 61 deletions
diff --git a/toolkit/mozapps/webextensions/test/xpcshell/test_install_icons.js b/toolkit/mozapps/webextensions/test/xpcshell/test_install_icons.js
deleted file mode 100644
index 70f91c560..000000000
--- a/toolkit/mozapps/webextensions/test/xpcshell/test_install_icons.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-// use httpserver to find an available port
-Components.utils.import("resource://testing-common/httpd.js");
-var gServer = new HttpServer();
-gServer.start(-1);
-gPort = gServer.identity.primaryPort;
-
-var addon_url = "http://localhost:" + gPort + "/test.xpi";
-var icon32_url = "http://localhost:" + gPort + "/icon.png";
-var icon64_url = "http://localhost:" + gPort + "/icon64.png";
-
-function run_test() {
- do_test_pending();
- createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
- startupManager();
-
- test_1();
-}
-
-function test_1() {
- AddonManager.getInstallForURL(addon_url, function(aInstall) {
- do_check_eq(aInstall.iconURL, null);
- do_check_neq(aInstall.icons, null);
- do_check_eq(aInstall.icons[32], undefined);
- do_check_eq(aInstall.icons[64], undefined);
- test_2();
- }, "application/x-xpinstall", null, null, null, null, null);
-}
-
-function test_2() {
- AddonManager.getInstallForURL(addon_url, function(aInstall) {
- do_check_eq(aInstall.iconURL, icon32_url);
- do_check_neq(aInstall.icons, null);
- do_check_eq(aInstall.icons[32], icon32_url);
- do_check_eq(aInstall.icons[64], undefined);
- test_3();
- }, "application/x-xpinstall", null, null, icon32_url, null, null);
-}
-
-function test_3() {
- AddonManager.getInstallForURL(addon_url, function(aInstall) {
- do_check_eq(aInstall.iconURL, icon32_url);
- do_check_neq(aInstall.icons, null);
- do_check_eq(aInstall.icons[32], icon32_url);
- do_check_eq(aInstall.icons[64], undefined);
- test_4();
- }, "application/x-xpinstall", null, null, { "32": icon32_url }, null, null);
-}
-
-function test_4() {
- AddonManager.getInstallForURL(addon_url, function(aInstall) {
- do_check_eq(aInstall.iconURL, icon32_url);
- do_check_neq(aInstall.icons, null);
- do_check_eq(aInstall.icons[32], icon32_url);
- do_check_eq(aInstall.icons[64], icon64_url);
- do_execute_soon(do_test_finished);
- }, "application/x-xpinstall", null, null, { "32": icon32_url, "64": icon64_url }, null, null);
-}