summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpinstall/browser_relative.js')
-rw-r--r--toolkit/mozapps/extensions/test/xpinstall/browser_relative.js22
1 files changed, 8 insertions, 14 deletions
diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js b/toolkit/mozapps/extensions/test/xpinstall/browser_relative.js
index 3599f47d1..dfd5a0898 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: "amosigned.xpi",
+ URL: "unsigned.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 + "amosigned.xpi", "Should have listed the correct url for the item");
+ is(items[0].url, TESTROOT + "unsigned.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;
@@ -35,21 +35,15 @@ function install_ended(install, addon) {
install.cancel();
}
-const finish_test = Task.async(function*(count) {
+function finish_test(count) {
is(count, 1, "1 Add-on should have been successfully installed");
- Services.perms.remove(makeURI("http://example.com"), "install");
+ Services.perms.remove("example.com", "install");
- const results = yield ContentTask.spawn(gBrowser.selectedBrowser, null, () => {
- return {
- return: content.document.getElementById("return").textContent,
- status: content.document.getElementById("status").textContent,
- }
- })
-
- is(results.return, "true", "installTrigger should have claimed success");
- is(results.status, "0", "Callback should have seen a success");
+ 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();
-});
+}