diff --git a/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi b/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi
new file mode 100644
index 000000000000..4edf91e34a90
Binary files /dev/null and b/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi differ
diff --git a/toolkit/mozapps/extensions/test/xpinstall/amosigned2.xpi b/toolkit/mozapps/extensions/test/xpinstall/amosigned2.xpi
new file mode 100644
index 000000000000..74e877f26fe3
Binary files /dev/null and b/toolkit/mozapps/extensions/test/xpinstall/amosigned2.xpi differ
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser.ini b/toolkit/mozapps/extensions/test/xpinstall/browser.ini
index c5bdb06a057c..640022cc6db7 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser.ini
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser.ini
@@ -1,5 +1,7 @@
[DEFAULT]
support-files =
+ amosigned.xpi
+ amosigned2.xpi
authRedirect.sjs
bug540558.html
bug638292.html
@@ -19,6 +21,7 @@ support-files =
navigate.html
redirect.sjs
restartless.xpi
+ signed-multipackage.xpi
signed-no-cn.xpi
signed-no-o.xpi
signed-tampered.xpi
@@ -31,6 +34,10 @@ support-files =
triggerredirect.html
unsigned.xpi
+[browser_amosigned_trigger.js]
+[browser_amosigned_trigger_iframe.js]
+skip-if = buildapp == "mulet"
+[browser_amosigned_url.js]
[browser_auth.js]
[browser_auth2.js]
[browser_auth3.js]
@@ -77,21 +84,31 @@ skip-if = true # Bug 1084646
[browser_navigateaway4.js]
[browser_offline.js]
[browser_relative.js]
+[browser_signed_multipackage.js]
+skip-if = require_signing
[browser_signed_multiple.js]
+skip-if = require_signing
[browser_signed_naming.js]
+skip-if = require_signing
[browser_signed_tampered.js]
+skip-if = require_signing
[browser_signed_trigger.js]
+skip-if = require_signing
[browser_signed_untrusted.js]
+skip-if = require_signing
[browser_signed_url.js]
+skip-if = require_signing
[browser_softwareupdate.js]
[browser_switchtab.js]
[browser_trigger_redirect.js]
[browser_unsigned_trigger.js]
+skip-if = require_signing
[browser_unsigned_trigger_iframe.js]
-skip-if = buildapp == "mulet"
+skip-if = buildapp == "mulet" || require_signing
[browser_unsigned_trigger_xorigin.js]
skip-if = buildapp == "mulet"
[browser_unsigned_url.js]
+skip-if = require_signing
[browser_whitelist.js]
[browser_whitelist2.js]
[browser_whitelist3.js]
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
new file mode 100644
index 000000000000..3975792a7f4a
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger.js
@@ -0,0 +1,50 @@
+// ----------------------------------------------------------------------------
+// Tests installing an unsigned add-on through an InstallTrigger call in web
+// content.
+function test() {
+ Harness.installConfirmCallback = confirm_install;
+ Harness.installEndedCallback = install_ended;
+ Harness.installsCompletedCallback = finish_test;
+ Harness.finalContentEvent = "InstallComplete";
+ Harness.setup();
+
+ var pm = Services.perms;
+ pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
+
+ var triggers = encodeURIComponent(JSON.stringify({
+ "Unsigned XPI": {
+ URL: TESTROOT + "amosigned.xpi",
+ IconURL: TESTROOT + "icon.png",
+ toString: function() { return this.URL; }
+ }
+ }));
+ gBrowser.selectedTab = gBrowser.addTab();
+ gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
+}
+
+function confirm_install(window) {
+ var items = window.document.getElementById("itemList").childNodes;
+ is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
+ is(items[0].name, "XPI Test", "Should have seen the name");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+ is(items[0].signed, "false", "Should have listed the item as unsigned");
+ return true;
+}
+
+function install_ended(install, addon) {
+ install.cancel();
+}
+
+function finish_test(count) {
+ is(count, 1, "1 Add-on should have been successfully installed");
+
+ Services.perms.remove(makeURI("http://example.com"), "install");
+
+ var doc = gBrowser.contentDocument;
+ is(doc.getElementById("return").textContent, "true", "installTrigger should have claimed success");
+ is(doc.getElementById("status").textContent, "0", "Callback should have seen a success");
+
+ gBrowser.removeCurrentTab();
+ Harness.finish();
+}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
new file mode 100644
index 000000000000..c0cb156ededf
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_trigger_iframe.js
@@ -0,0 +1,51 @@
+// ----------------------------------------------------------------------------
+// Test for bug 589598 - Ensure that installing through InstallTrigger
+// works in an iframe in web content.
+
+function test() {
+ Harness.installConfirmCallback = confirm_install;
+ Harness.installEndedCallback = install_ended;
+ 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(TESTROOT + "installtrigger_frame.html?" + inner_url);
+}
+
+function confirm_install(window) {
+ var items = window.document.getElementById("itemList").childNodes;
+ is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
+ is(items[0].name, "XPI Test", "Should have seen the name");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
+ is(items[0].signed, "false", "Should have listed the item as unsigned");
+ return true;
+}
+
+function install_ended(install, addon) {
+ install.cancel();
+}
+
+function finish_test(count) {
+ is(count, 1, "1 Add-on should have been successfully installed");
+
+ Services.perms.remove(makeURI("http://example.com"), "install");
+
+ var doc = gBrowser.contentWindow.frames[0].document; // Document of iframe
+ is(doc.getElementById("return").textContent, "true", "installTrigger in iframe should have claimed success");
+ is(doc.getElementById("status").textContent, "0", "Callback in iframe should have seen a success");
+
+ gBrowser.removeCurrentTab();
+ Harness.finish();
+}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js
new file mode 100644
index 000000000000..f6c39b7bb861
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_amosigned_url.js
@@ -0,0 +1,35 @@
+// ----------------------------------------------------------------------------
+// Tests installing an unsigned add-on by navigating directly to the url
+function test() {
+ Harness.installConfirmCallback = confirm_install;
+ Harness.installEndedCallback = install_ended;
+ Harness.installsCompletedCallback = finish_test;
+ Harness.setup();
+
+ gBrowser.selectedTab = gBrowser.addTab("about:blank");
+ BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
+ gBrowser.loadURI(TESTROOT + "amosigned.xpi");
+ });
+}
+
+function confirm_install(window) {
+ let items = window.document.getElementById("itemList").childNodes;
+ is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
+ is(items[0].name, "XPI Test", "Should have had the filename for the item name");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].icon, "", "Should have listed no icon for the item");
+ is(items[0].signed, "false", "Should have listed the item as unsigned");
+ return true;
+}
+
+function install_ended(install, addon) {
+ install.cancel();
+}
+
+function finish_test(count) {
+ is(count, 1, "1 Add-on should have been successfully installed");
+
+ gBrowser.removeCurrentTab();
+ Harness.finish();
+}
+// ----------------------------------------------------------------------------
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js
index ff01717130c8..1bfa7696f817 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js
@@ -16,7 +16,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth2.js
index df97abc547c1..80942a9f4106 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth2.js
@@ -14,7 +14,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth3.js
index 82be68799341..e6c756e51dfc 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth3.js
@@ -22,7 +22,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js
index 9ea9d60f1940..b294d4293f4c 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js
@@ -21,7 +21,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "authRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gNewTab = gBrowser.addTab();
gBrowser.getBrowserForTab(gNewTab).loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_badargs.js b/toolkit/mozapps/extensions/test/xpinstall/browser_badargs.js
index fb9c3d10c537..6860222e6b0a 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_badargs.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_badargs.js
@@ -4,7 +4,7 @@
function test() {
waitForExplicitFinish();
- var triggers = encodeURIComponent(JSON.stringify(TESTROOT + "unsigned.xpi"));
+ var triggers = encodeURIComponent(JSON.stringify(TESTROOT + "amosigned.xpi"));
gBrowser.selectedTab = gBrowser.addTab();
function loadListener() {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js b/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
index 782ec6ab9ea1..9a26a77e4990 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_badhash.js
@@ -11,7 +11,7 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
+ URL: TESTROOT + "amosigned.xpi",
Hash: "sha1:643b08418599ddbd1ea8a511c90696578fb844b9",
toString: function() { return this.URL; }
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js b/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
index f36bb11629a0..a9de9e4f03f0 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_badhashtype.js
@@ -11,7 +11,7 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
+ URL: TESTROOT + "amosigned.xpi",
Hash: "foo:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f",
toString: function() { return this.URL; }
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js b/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
index 78da9fb5cf2a..81d89c025af0 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js
@@ -19,7 +19,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_cancel.js b/toolkit/mozapps/extensions/test/xpinstall/browser_cancel.js
index d778c2c597aa..e30d7a0e5860 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_cancel.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_cancel.js
@@ -14,8 +14,8 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Signed XPI": TESTROOT + "signed.xpi",
- "Signed XPI 2": TESTROOT + "signed2.xpi",
+ "Unsigned XPI": TESTROOT + "amosigned.xpi",
+ "Unsigned XPI 2": TESTROOT + "amosigned2.xpi",
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
@@ -33,17 +33,15 @@ function get_item(items, url) {
function confirm_install(window) {
let items = window.document.getElementById("itemList").childNodes;
is(items.length, 2, "Should be 2 items listed in the confirmation dialog");
- let item = get_item(items, TESTROOT + "signed.xpi");
+ let item = get_item(items, TESTROOT + "amosigned.xpi");
if (item) {
- is(item.name, "Signed XPI Test", "Should have seen the name from the trigger list");
- is(item.cert, "(Object Signer)", "Should have seen the signer");
- is(item.signed, "true", "Should have listed the item as signed");
+ is(item.name, "XPI Test", "Should have seen the name from the trigger list");
+ is(item.signed, "false", "Should have listed the item as signed");
}
- item = get_item(items, TESTROOT + "signed2.xpi");
+ item = get_item(items, TESTROOT + "amosigned2.xpi");
if (item) {
is(item.name, "Signed XPI Test", "Should have seen the name from the trigger list");
- is(item.cert, "(Object Signer)", "Should have seen the signer");
- is(item.signed, "true", "Should have listed the item as signed");
+ is(item.signed, "false", "Should have listed the item as signed");
}
return false;
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies.js b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies.js
index b1677f5385ab..541ac83336d5 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies.js
@@ -11,7 +11,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies2.js
index f28993299244..c7389298cb2c 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies2.js
@@ -16,7 +16,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies3.js
index c28b41f1ef37..a50388ee8876 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies3.js
@@ -18,7 +18,7 @@ function test() {
Services.prefs.setIntPref("network.cookie.cookieBehavior", 1);
var triggers = encodeURIComponent(JSON.stringify({
- "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Cookie check": TESTROOT + "cookieRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies4.js
index d4f0a5d89136..6598b3bdb0ab 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_cookies4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_cookies4.js
@@ -19,7 +19,7 @@ function test() {
Services.prefs.setIntPref("network.cookie.cookieBehavior", 1);
var triggers = encodeURIComponent(JSON.stringify({
- "Cookie check": TESTROOT2 + "cookieRedirect.sjs?" + TESTROOT + "unsigned.xpi"
+ "Cookie check": TESTROOT2 + "cookieRedirect.sjs?" + TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js b/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
index 553573c853ac..a8bdbde39ac2 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_datauri.js
@@ -18,7 +18,7 @@ function test() {
Harness.setup();
setup_redirect({
- "Location": "data:text/html,"
+ "Location": "data:text/html,"
});
gBrowser.selectedTab = gBrowser.addTab();
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
index 4cb6fe37bf5b..15bad4ba9bb1 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js
@@ -9,7 +9,7 @@ function test() {
Services.prefs.setBoolPref("xpinstall.enabled", false);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
index b2ebe32a14b0..4c45bd1844bb 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js
@@ -11,8 +11,8 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
- Hash: "sha1:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f",
+ URL: TESTROOT + "amosigned.xpi",
+ Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
toString: function() { return this.URL; }
}
}));
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
index eec811a65c1e..4c8e262c7c43 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js
@@ -11,8 +11,8 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
- Hash: "sha1:3D0DC22E1F394E159B08AAF5F0F97DE4D5C65F4F",
+ URL: TESTROOT + "amosigned.xpi",
+ Hash: "sha1:36FFB0ACFD9C6E9682473AAEBAAB394D38B473C9",
toString: function() { return this.URL; }
}
}));
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
index 1ce1754f14fd..6a1222797c2f 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js
@@ -12,7 +12,7 @@ function test() {
Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f|" + TESTROOT + "unsigned.xpi";
+ url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|" + TESTROOT + "amosigned.xpi";
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
index 6b15104a979b..2d930d221987 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash2.js
@@ -12,7 +12,7 @@ function test() {
Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:foobar|" + TESTROOT + "unsigned.xpi";
+ url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
index 87e8fce857dc..5f3ef23ca49e 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js
@@ -11,12 +11,12 @@ function test() {
Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:foobar|" + TESTROOT + "unsigned.xpi";
+ url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
URL: url,
- Hash: "sha1:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f",
+ Hash: "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
toString: function() { return this.URL; }
}
}));
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
index 86997cd89a84..3983662af37a 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash4.js
@@ -10,7 +10,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var url = "http://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:foobar|" + TESTROOT + "unsigned.xpi";
+ url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
index b84ac2ab9365..407158e4fdd0 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js
@@ -11,9 +11,9 @@ function test() {
Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false);
var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f|";
+ url += "?sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9|";
url += "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs";
- url += "?sha1:foobar|" + TESTROOT + "unsigned.xpi";
+ url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi";
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
index a6102f6c03c6..5e1da8175fa9 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash6.js
@@ -26,7 +26,7 @@ function test() {
// Set up the redirect to give a bad hash
setup_redirect({
"X-Target-Digest": "sha1:foo",
- "Location": "http://example.com/browser/" + RELATIVE_DIR + "unsigned.xpi"
+ "Location": "http://example.com/browser/" + RELATIVE_DIR + "amosigned.xpi"
});
var url = "https://example.com/browser/" + RELATIVE_DIR + "redirect.sjs?mode=redirect";
@@ -55,8 +55,8 @@ function finish_failed_download() {
// Give it the right hash this time
setup_redirect({
- "X-Target-Digest": "sha1:3d0dc22e1f394e159b08aaf5f0f97de4d5c65f4f",
- "Location": "http://example.com/browser/" + RELATIVE_DIR + "unsigned.xpi"
+ "X-Target-Digest": "sha1:36ffb0acfd9c6e9682473aaebaab394d38b473c9",
+ "Location": "http://example.com/browser/" + RELATIVE_DIR + "amosigned.xpi"
});
// The harness expects onNewInstall events for all installs that are about to start
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_installchrome.js b/toolkit/mozapps/extensions/test/xpinstall/browser_installchrome.js
index 2bb29e9ccdcf..2380a4df2df1 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_installchrome.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_installchrome.js
@@ -9,7 +9,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "unsigned.xpi"));
+ gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
}
function install_ended(install, addon) {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile.js
index 0bec84b18862..48d3b619b2f8 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile.js
@@ -11,7 +11,7 @@ function test() {
var chromeroot = extractChromeRoot(gTestPath);
var xpipath = chromeroot + "unsigned.xpi";
try {
- xpipath = cr.convertChromeURL(makeURI(chromeroot + "unsigned.xpi")).spec;
+ xpipath = cr.convertChromeURL(makeURI(chromeroot + "amosigned.xpi")).spec;
} catch (ex) {
//scenario where we are running from a .jar and already extracted
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile2.js
index df0de09f1807..d71a95d7bbf3 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile2.js
@@ -8,9 +8,9 @@ function test() {
.getService(Components.interfaces.nsIChromeRegistry);
var chromeroot = getChromeRoot(gTestPath);
- var xpipath = chromeroot + "unsigned.xpi";
+ var xpipath = chromeroot + "amosigned.xpi";
try {
- xpipath = cr.convertChromeURL(makeURI(chromeroot + "unsigned.xpi")).spec;
+ xpipath = cr.convertChromeURL(makeURI(xpipath)).spec;
} catch (ex) {
//scenario where we are running from a .jar and already extracted
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js
index 0cc75b2b11eb..8d1b004f0edd 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js
@@ -13,9 +13,9 @@ function test() {
.getService(Components.interfaces.nsIChromeRegistry);
var chromeroot = extractChromeRoot(gTestPath);
- var xpipath = chromeroot + "unsigned.xpi";
+ var xpipath = chromeroot + "amosigned.xpi";
try {
- xpipath = cr.convertChromeURL(makeURI(chromeroot + "unsigned.xpi")).spec;
+ xpipath = cr.convertChromeURL(makeURI(xpipath)).spec;
} catch (ex) {
//scenario where we are running from a .jar and already extracted
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js
index db970ed3b826..66ac05af7327 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js
@@ -20,7 +20,7 @@ function test() {
//scenario where we are running from a .jar and already extracted
}
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(xpipath + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js b/toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js
index c5e00008c88b..d022d713ad6e 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_multipackage.js
@@ -33,8 +33,7 @@ function confirm_install(window) {
item = get_item(items, "Signed XPI Test");
if (item) {
- is(item.cert, "(Object Signer)", "Should have seen the signer");
- is(item.signed, "true", "Should have listed the item as signed");
+ is(item.signed, "false", "Should have listed the item as signed");
is(item.icon, "", "Should have listed no icon for the item");
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js
index 7efdc31b89a2..f092edb8c423 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway.js
@@ -12,7 +12,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js
index a1584be89e6d..a41662e1ece8 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js
@@ -11,7 +11,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js
index 473c5a26ad32..3948d56497ae 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway3.js
@@ -14,7 +14,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js
index b5320c76cea8..61844c5a1ad9 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway4.js
@@ -13,7 +13,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js b/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js
index 8a16a6a807cd..6e6392908858 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js
@@ -11,7 +11,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js b/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
index fe0cd11ac55c..247ef6e87c16 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
@@ -12,7 +12,7 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: "unsigned.xpi",
+ URL: "amosigned.xpi",
IconURL: "icon.png",
toString: function() { return this.URL; }
}
@@ -25,7 +25,7 @@ function confirm_install(window) {
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
is(items[0].name, "XPI Test", "Should have seen the name");
- is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
is(items[0].signed, "false", "Should have listed the item as unsigned");
return true;
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_multipackage.js b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_multipackage.js
new file mode 100644
index 000000000000..7341f3082997
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_multipackage.js
@@ -0,0 +1,53 @@
+// ----------------------------------------------------------------------------
+// Tests installing an signed add-on by navigating directly to the url
+function test() {
+ Harness.installConfirmCallback = confirm_install;
+ Harness.installEndedCallback = install_ended;
+ Harness.installsCompletedCallback = finish_test;
+ Harness.setup();
+
+ gBrowser.selectedTab = gBrowser.addTab("about:blank");
+ BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
+ gBrowser.loadURI(TESTROOT + "signed-multipackage.xpi");
+ });
+}
+
+function get_item(items, name) {
+ for (let item of items) {
+ if (item.name == name)
+ return item;
+ }
+ ok(false, "Item for " + name + " was not listed");
+ return null;
+}
+
+function confirm_install(window) {
+ let items = window.document.getElementById("itemList").childNodes;
+ is(items.length, 2, "Should be 2 items listed in the confirmation dialog");
+
+ let item = get_item(items, "XPI Test");
+ if (item) {
+ is(item.signed, "false", "Should not have listed the item as signed");
+ is(item.icon, "", "Should have listed no icon for the item");
+ }
+
+ item = get_item(items, "Signed XPI Test");
+ if (item) {
+ is(item.cert, "(Object Signer)", "Should have seen the signer");
+ is(item.signed, "true", "Should have listed the item as signed");
+ is(item.icon, "", "Should have listed no icon for the item");
+ }
+
+ return true;
+}
+
+function install_ended(install, addon) {
+ install.cancel();
+}
+
+function finish_test(count) {
+ is(count, 2, "2 Add-ons should have been successfully installed");
+ gBrowser.removeCurrentTab();
+ Harness.finish();
+}
+// ----------------------------------------------------------------------------
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_softwareupdate.js b/toolkit/mozapps/extensions/test/xpinstall/browser_softwareupdate.js
index 7c251fdd5b33..16e20f3e9a16 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_softwareupdate.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_softwareupdate.js
@@ -9,7 +9,7 @@ function test() {
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.loadURI(TESTROOT + "startsoftwareupdate.html? " + encodeURIComponent(TESTROOT + "unsigned.xpi"));
+ gBrowser.loadURI(TESTROOT + "startsoftwareupdate.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
}
function install_ended(install, addon) {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js b/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
index d027db2555be..9bbb594005d9 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_switchtab.js
@@ -14,7 +14,7 @@ function test() {
var triggers = encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
+ URL: TESTROOT + "amosigned.xpi",
IconURL: TESTROOT + "icon.png",
toString: function() { return this.URL; }
}
@@ -27,7 +27,7 @@ function confirm_install(window) {
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
is(items[0].name, "XPI Test", "Should have seen the name");
- is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
is(items[0].signed, "false", "Should have listed the item as unsigned");
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js b/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
index d1835b1f61be..9c05436029db 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js
@@ -18,7 +18,7 @@ function confirm_install(window) {
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
is(items[0].name, "XPI Test", "Should have seen the name");
- is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
is(items[0].icon, TESTROOT + "icon.png", "Should have listed the correct icon for the item");
is(items[0].signed, "false", "Should have listed the item as unsigned");
return true;
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
index 48dcf50599c4..b0875fc99926 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js
@@ -14,7 +14,7 @@ function test() {
var inner_url = encodeURIComponent(TESTROOT + "installtrigger.html?" + encodeURIComponent(JSON.stringify({
"Unsigned XPI": {
- URL: TESTROOT + "unsigned.xpi",
+ URL: TESTROOT + "amosigned.xpi",
IconURL: TESTROOT + "icon.png",
toString: function() { return this.URL; }
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
index 448ce3a5cea7..319ea73a6f4f 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js
@@ -10,7 +10,7 @@ function test() {
Harness.setup();
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
@@ -26,7 +26,7 @@ function confirm_install(window) {
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
is(items[0].name, "XPI Test", "Should have seen the name from the trigger list");
- is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].url, TESTROOT + "amosigned.xpi", "Should have listed the correct url for the item");
is(items[0].signed, "false", "Should have listed the item as unsigned");
return true;
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js
index 1878062e5df3..fd9e944e8acd 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist2.js
@@ -11,7 +11,7 @@ function test() {
pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
var triggers = encodeURIComponent(JSON.stringify({
- "Unsigned XPI": TESTROOT2 + "unsigned.xpi"
+ "Unsigned XPI": TESTROOT2 + "amosigned.xpi"
}));
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js
index 282e904c07fd..6f4306df6040 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js
@@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// Tests installing an unsigned add-on through a navigation. Should not be
// blocked since the referer is whitelisted.
-var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
+var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "amosigned.xpi");
function test() {
Harness.installConfirmCallback = confirm_install;
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js
index c77b9d6629ca..e4c47cda562a 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist4.js
@@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// Tests installing an unsigned add-on through a navigation. Should be
// blocked since the referer is not whitelisted even though the target is.
-var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "unsigned.xpi");
+var url = TESTROOT2 + "navigate.html?" + encodeURIComponent(TESTROOT + "amosigned.xpi");
function test() {
Harness.installBlockedCallback = allow_blocked;
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js
index 97448d803a2a..0a9333430ad3 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist5.js
@@ -8,7 +8,7 @@ function test() {
Harness.setup();
gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.loadURI(TESTROOT + "startsoftwareupdate.html? " + encodeURIComponent(TESTROOT + "unsigned.xpi"));
+ gBrowser.loadURI(TESTROOT + "startsoftwareupdate.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
}
function allow_blocked(installInfo) {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js
index f2f3641e4e06..555f1e2fcba8 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist6.js
@@ -8,7 +8,7 @@ function test() {
Harness.setup();
gBrowser.selectedTab = gBrowser.addTab();
- gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "unsigned.xpi"));
+ gBrowser.loadURI(TESTROOT + "installchrome.html? " + encodeURIComponent(TESTROOT + "amosigned.xpi"));
}
function allow_blocked(installInfo) {
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js
index ebe516b5c0a4..96c60ac9e883 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js
+++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist7.js
@@ -12,7 +12,7 @@ function test() {
gBrowser.selectedTab = gBrowser.addTab("about:blank");
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
- gBrowser.loadURI(TESTROOT + "unsigned.xpi");
+ gBrowser.loadURI(TESTROOT + "amosigned.xpi");
});
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/bug540558.html b/toolkit/mozapps/extensions/test/xpinstall/bug540558.html
index 666a56437cfe..286046d25bc5 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/bug540558.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/bug540558.html
@@ -10,7 +10,7 @@
diff --git a/toolkit/mozapps/extensions/test/xpinstall/bug645699.html b/toolkit/mozapps/extensions/test/xpinstall/bug645699.html
index 5944ed77c160..6fda36a296ef 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/bug645699.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/bug645699.html
@@ -20,7 +20,7 @@ function startInstall() {
Object.defineProperty(document, "documentURIObject", { spec : { href : whiteUrl } });
InstallTrigger.install({
- "Unsigned XPI": "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi"
+ "Unsigned XPI": "http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi"
});
}
diff --git a/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html b/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
index 55ff9a2b805c..96fd5a137bca 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/concurrent_installs.html
@@ -19,7 +19,7 @@ function installCallback(url, status) {
function startInstall() {
var root = location.href.replace("concurrent_installs.html", "");
var triggers = {
- "Unsigned XPI": root + "unsigned.xpi"
+ "Unsigned XPI": root + "amosigned.xpi"
};
try {
document.getElementById("return").textContent = InstallTrigger.install(triggers, installCallback);
diff --git a/toolkit/mozapps/extensions/test/xpinstall/multipackage.xpi b/toolkit/mozapps/extensions/test/xpinstall/multipackage.xpi
index 11fbe1861a37..d52f28c2872c 100644
Binary files a/toolkit/mozapps/extensions/test/xpinstall/multipackage.xpi and b/toolkit/mozapps/extensions/test/xpinstall/multipackage.xpi differ
diff --git a/toolkit/mozapps/extensions/test/xpinstall/signed-multipackage.xpi b/toolkit/mozapps/extensions/test/xpinstall/signed-multipackage.xpi
new file mode 100644
index 000000000000..11fbe1861a37
Binary files /dev/null and b/toolkit/mozapps/extensions/test/xpinstall/signed-multipackage.xpi differ
diff --git a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
index 568b0370994d..46baf57182f3 100644
--- a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
@@ -20,7 +20,7 @@ function installCallback(url, status) {
function startInstall() {
InstallTrigger.install({
"Unsigned XPI": {
- URL: "unsigned.xpi",
+ URL: "amosigned.xpi",
IconURL: "icon.png",
toString: function() { return this.URL; }
}