summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js')
-rw-r--r--toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js b/toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
deleted file mode 100644
index b0875fc99..000000000
--- a/toolkit/mozapps/webextensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// ----------------------------------------------------------------------------
-// Ensure that an inner frame from a different origin can't initiate an install
-
-var wasOriginBlocked = false;
-
-function test() {
- Harness.installOriginBlockedCallback = install_blocked;
- Harness.installsCompletedCallback = finish_test;
- Harness.finalContentEvent = "InstallComplete";
- Harness.setup();
-
- var pm = Services.perms;
- pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
-
- var inner_url = encodeURIComponent(TESTROOT + "installtrigger.html?" + encodeURIComponent(JSON.stringify({
- "Unsigned XPI": {
- URL: TESTROOT + "amosigned.xpi",
- IconURL: TESTROOT + "icon.png",
- toString: function() { return this.URL; }
- }
- })));
- gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.loadURI(TESTROOT2 + "installtrigger_frame.html?" + inner_url);
-}
-
-function install_blocked(installInfo) {
- wasOriginBlocked = true;
-}
-
-function finish_test(count) {
- ok(wasOriginBlocked, "Should have been blocked due to the cross origin request.");
-
- is(count, 0, "No add-ons should have been installed");
- Services.perms.remove(makeURI("http://example.com"), "install");
-
- gBrowser.removeCurrentTab();
- Harness.finish();
-}