diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /toolkit/mozapps/extensions/test/xpinstall | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpinstall')
24 files changed, 125 insertions, 108 deletions
diff --git a/toolkit/mozapps/extensions/test/xpinstall/amosigned-mv3-cose.xpi b/toolkit/mozapps/extensions/test/xpinstall/amosigned-mv3-cose.xpi Binary files differnew file mode 100644 index 0000000000..e09747686b --- /dev/null +++ b/toolkit/mozapps/extensions/test/xpinstall/amosigned-mv3-cose.xpi diff --git a/toolkit/mozapps/extensions/test/xpinstall/amosigned-sha1only.xpi b/toolkit/mozapps/extensions/test/xpinstall/amosigned-sha1only.xpi Binary files differnew file mode 100644 index 0000000000..f2948e6994 --- /dev/null +++ b/toolkit/mozapps/extensions/test/xpinstall/amosigned-sha1only.xpi diff --git a/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi b/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi Binary files differindex f2948e6994..9e895dbbb4 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi +++ b/toolkit/mozapps/extensions/test/xpinstall/amosigned.xpi diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser.toml b/toolkit/mozapps/extensions/test/xpinstall/browser.toml index f6ca43982e..f2c73b0a1d 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser.toml +++ b/toolkit/mozapps/extensions/test/xpinstall/browser.toml @@ -96,7 +96,7 @@ https_first_disabled = true # Bug 1737265 ["browser_doorhanger_installs.js"] https_first_disabled = true # Bug 1737265 skip-if = [ - "os == 'win' && os_version == '10.0' && bits == 64", #Bug 1615449 + "os == 'win' && os_version == '10.2009' && bits == 64", #Bug 1615449 ] ["browser_empty.js"] diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js index 2248af4270..171504049c 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth.js @@ -42,7 +42,7 @@ function get_auth_info() { return ["testuser", "testpass"]; } -function download_failed(install) { +function download_failed() { ok(false, "Install should not have failed"); } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js index 46ee2b5cb6..0763d2e55c 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_auth4.js @@ -45,7 +45,7 @@ function get_auth_info() { return ["testuser", "testpass"]; } -function download_failed(install) { +function download_failed() { ok(false, "Install should not have failed"); } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js b/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js index 690ac2b3eb..ca05f822b6 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699.js @@ -54,7 +54,7 @@ function allow_blocked(installInfo) { return false; } -function confirm_install(panel) { +function confirm_install() { ok(false, "Should not see the install dialog"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699_postDownload.js b/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699_postDownload.js index aa8b948c14..a857d11405 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699_postDownload.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug645699_postDownload.js @@ -40,7 +40,7 @@ function allow_blocked(installInfo) { return false; } -function confirm_install(panel) { +function confirm_install() { ok(false, "Should not see the install dialog"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js b/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js index 216d543458..2961d327d3 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_bug672485.js @@ -36,7 +36,7 @@ function test() { ); } -function confirm_install(panel) { +function confirm_install() { ok(false, "Should not see the install dialog"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js b/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js index 01c8089180..073c44eecd 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js @@ -52,7 +52,7 @@ async function waitForProgressNotification( let topic = getObserverTopic(notificationId); let observerPromise = new Promise(resolve => { - Services.obs.addObserver(function observer(aSubject, aTopic, aData) { + Services.obs.addObserver(function observer(aSubject, aTopic) { // Ignore the progress notification unless that is the notification we want if ( notificationId != PROGRESS_NOTIFICATION && @@ -208,7 +208,7 @@ async function waitForNotification( let observerPromise; if (aId !== "addon-webext-permissions") { observerPromise = new Promise(resolve => { - Services.obs.addObserver(function observer(aSubject, aTopic, aData) { + Services.obs.addObserver(function observer(aSubject, aTopic) { // Ignore the progress notification unless that is the notification we want if ( aId != PROGRESS_NOTIFICATION && @@ -298,7 +298,7 @@ function acceptInstallDialog(installDialog) { installDialog.button.click(); } -async function waitForSingleNotification(aCallback) { +async function waitForSingleNotification() { while (PopupNotifications.panel.childNodes.length != 1) { await new Promise(resolve => executeSoon(resolve)); @@ -697,27 +697,37 @@ var TESTS = [ let installDialogPromise = waitForInstallDialog(); - let tab = await BrowserTestUtils.openNewForegroundTab( - gBrowser, - TESTROOT + "installtrigger.html?" + triggers - ); + try { + // Prevent install to fail due to privileged.xpi version using + // an addon version that hits a manifest warning (see PRIV_ADDON_VERSION). + // TODO(Bug 1824240): remove this once privileged.xpi can be resigned with a + // version format that does not hit a manifest warning. + ExtensionTestUtils.failOnSchemaWarnings(false); + let tab = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + TESTROOT + "installtrigger.html?" + triggers + ); - let notificationPromise = acceptAppMenuNotificationWhenShown( - "addon-installed", - "test@tests.mozilla.org", - { incognitoHidden: true } - ); + let notificationPromise = acceptAppMenuNotificationWhenShown( + "addon-installed", + "test@tests.mozilla.org", + { incognitoHidden: true } + ); - (await installDialogPromise).button.click(); - await notificationPromise; + (await installDialogPromise).button.click(); + await notificationPromise; - let installs = await AddonManager.getAllInstalls(); - is(installs.length, 0, "Should be no pending installs"); + let installs = await AddonManager.getAllInstalls(); + is(installs.length, 0, "Should be no pending installs"); - let addon = await AddonManager.getAddonByID("test@tests.mozilla.org"); - await addon.uninstall(); + let addon = await AddonManager.getAddonByID("test@tests.mozilla.org"); + await addon.uninstall(); + + await BrowserTestUtils.removeTab(tab); + } finally { + ExtensionTestUtils.failOnSchemaWarnings(true); + } - await BrowserTestUtils.removeTab(tab); await SpecialPowers.popPrefEnv(); AddonManager.checkUpdateSecurity = true; }, @@ -1477,7 +1487,7 @@ var TESTS = [ var gTestStart = null; var XPInstallObserver = { - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { var installInfo = aSubject.wrappedJSObject; info( "Observed " + aTopic + " for " + installInfo.installs.length + " installs" diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_enabled.js b/toolkit/mozapps/extensions/test/xpinstall/browser_enabled.js index b8ee1b254f..f00d6ca0d8 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_enabled.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_enabled.js @@ -51,17 +51,17 @@ add_task(async function test_disabled() { add_task(async function test_disabled2() { let installDisabledCalled = false; - Harness.installDisabledCallback = installInfo => { + Harness.installDisabledCallback = () => { installDisabledCalled = true; ok(true, "Saw installation disabled"); }; - Harness.installBlockedCallback = installInfo => { + Harness.installBlockedCallback = () => { ok(false, "Should never see the blocked install notification"); return false; }; - Harness.installConfirmCallback = panel => { + Harness.installConfirmCallback = () => { ok(false, "Should never see an install confirmation dialog"); return false; }; diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js index ab7d21b64e..2563b64dd4 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash.js @@ -1,12 +1,17 @@ // ---------------------------------------------------------------------------- // Test whether an install succeeds when a valid hash is included // This verifies bug 302284 -function test() { +add_task(async function test_install_with_hash() { // This test currently depends on InstallTrigger.install availability. setInstallTriggerPrefs(); - Harness.installEndedCallback = install_ended; - Harness.installsCompletedCallback = finish_test; + const xpiFilePath = getTestFilePath("./amosigned.xpi"); + const xpiFileHash = await IOUtils.computeHexDigest(xpiFilePath, "sha256"); + + const deferredInstallCompleted = Promise.withResolvers(); + + Harness.installEndedCallback = (install, addon) => addon.uninstall(); + Harness.installsCompletedCallback = deferredInstallCompleted.resolve; Harness.setup(); PermissionTestUtils.add( @@ -19,7 +24,7 @@ function test() { JSON.stringify({ "Unsigned XPI": { URL: TESTROOT + "amosigned.xpi", - Hash: "sha1:ee95834ad862245a9ef99ccecc2a857cadc16404", + Hash: `sha256:${xpiFileHash}`, toString() { return this.URL; }, @@ -31,17 +36,13 @@ function test() { gBrowser, TESTROOT + "installtrigger.html?" + triggers ); -} - -function install_ended(install, addon) { - return addon.uninstall(); -} -function finish_test(count) { + info("Wait for the install to be completed"); + const count = await deferredInstallCompleted.promise; is(count, 1, "1 Add-on should have been successfully installed"); PermissionTestUtils.remove("http://example.com", "install"); gBrowser.removeCurrentTab(); Harness.finish(); -} +}); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js index 9fd0c66292..e7779792ac 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_hash2.js @@ -1,12 +1,17 @@ // ---------------------------------------------------------------------------- // Test whether an install succeeds using case-insensitive hashes // This verifies bug 603021 -function test() { +add_task(async function test_install_hash_case_insensitive() { // This test currently depends on InstallTrigger.install availability. setInstallTriggerPrefs(); - Harness.installEndedCallback = install_ended; - Harness.installsCompletedCallback = finish_test; + const xpiFilePath = getTestFilePath("./amosigned.xpi"); + const xpiFileHash = await IOUtils.computeHexDigest(xpiFilePath, "sha256"); + + const deferredInstallCompleted = Promise.withResolvers(); + + Harness.installEndedCallback = (install, addon) => addon.uninstall(); + Harness.installsCompletedCallback = deferredInstallCompleted.resolve; Harness.setup(); PermissionTestUtils.add( @@ -19,7 +24,7 @@ function test() { JSON.stringify({ "Unsigned XPI": { URL: TESTROOT + "amosigned.xpi", - Hash: "sha1:EE95834AD862245A9EF99CCECC2A857CADC16404", + Hash: `sha256:${xpiFileHash.toUpperCase()}`, toString() { return this.URL; }, @@ -31,17 +36,13 @@ function test() { gBrowser, TESTROOT + "installtrigger.html?" + triggers ); -} - -function install_ended(install, addon) { - return addon.uninstall(); -} -function finish_test(count) { + info("Wait for the install to be completed"); + const count = await deferredInstallCompleted.promise; is(count, 1, "1 Add-on should have been successfully installed"); PermissionTestUtils.remove("http://example.com", "install"); gBrowser.removeCurrentTab(); Harness.finish(); -} +}); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js index 1ce8eb55af..6f788e5122 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash.js @@ -2,12 +2,21 @@ // Test whether an install succeeds when a valid hash is included in the HTTPS // request // This verifies bug 591070 -function test() { +add_task(async function test_instal_hash_https() { // This test currently depends on InstallTrigger.install availability. setInstallTriggerPrefs(); - Harness.installEndedCallback = install_ended; - Harness.installsCompletedCallback = finish_test; + await SpecialPowers.pushPrefEnv({ + set: [[PREF_INSTALL_REQUIREBUILTINCERTS, false]], + }); + + const xpiFilePath = getTestFilePath("./amosigned.xpi"); + const xpiFileHash = await IOUtils.computeHexDigest(xpiFilePath, "sha256"); + + const deferredInstallCompleted = Promise.withResolvers(); + + Harness.installEndedCallback = (install, addon) => addon.uninstall(); + Harness.installsCompletedCallback = deferredInstallCompleted.resolve; Harness.setup(); PermissionTestUtils.add( @@ -15,13 +24,8 @@ function test() { "install", Services.perms.ALLOW_ACTION ); - Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false); - var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs"; - url += - "?sha1:ee95834ad862245a9ef99ccecc2a857cadc16404|" + - TESTROOT + - "amosigned.xpi"; + const url = `https://example.com/browser/${RELATIVE_DIR}hashRedirect.sjs?sha256:${xpiFileHash}|${TESTROOT}amosigned.xpi`; var triggers = encodeURIComponent( JSON.stringify({ @@ -38,18 +42,14 @@ function test() { gBrowser, TESTROOT + "installtrigger.html?" + triggers ); -} - -function install_ended(install, addon) { - return addon.uninstall(); -} -function finish_test(count) { + info("Wait for the install to be completed"); + const count = await deferredInstallCompleted.promise; is(count, 1, "1 Add-on should have been successfully installed"); PermissionTestUtils.remove("http://example.com", "install"); - Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS); + await SpecialPowers.popPrefEnv(); gBrowser.removeCurrentTab(); Harness.finish(); -} +}); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js index ffb5a3ddb4..d76ba58135 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash3.js @@ -1,12 +1,25 @@ // ---------------------------------------------------------------------------- // Tests that the HTTPS hash is ignored when InstallTrigger is passed a hash. // This verifies bug 591070 -function test() { +add_task(async function test_installTrigger_hash_override() { // This test currently depends on InstallTrigger.install availability. + // NOTE: this test is covering a feature that we don't support anymore on any + // on the Firefox channels, and so we can remove this test along with + // removing InstallTrigger implementation (even if the InstallTrigger global + // is going to stay defined as null on all channels). setInstallTriggerPrefs(); - Harness.installEndedCallback = install_ended; - Harness.installsCompletedCallback = finish_test; + await SpecialPowers.pushPrefEnv({ + set: [[PREF_INSTALL_REQUIREBUILTINCERTS, false]], + }); + + const xpiFilePath = getTestFilePath("./amosigned.xpi"); + const xpiFileHash = await IOUtils.computeHexDigest(xpiFilePath, "sha256"); + + const deferredInstallCompleted = Promise.withResolvers(); + + Harness.installEndedCallback = (install, addon) => addon.uninstall(); + Harness.installsCompletedCallback = deferredInstallCompleted.resolve; Harness.setup(); PermissionTestUtils.add( @@ -14,7 +27,6 @@ function test() { "install", Services.perms.ALLOW_ACTION ); - Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false); var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs"; url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi"; @@ -23,7 +35,7 @@ function test() { JSON.stringify({ "Unsigned XPI": { URL: url, - Hash: "sha1:ee95834ad862245a9ef99ccecc2a857cadc16404", + Hash: `sha256:${xpiFileHash}`, toString() { return this.URL; }, @@ -35,18 +47,14 @@ function test() { gBrowser, TESTROOT + "installtrigger.html?" + triggers ); -} - -function install_ended(install, addon) { - return addon.uninstall(); -} -function finish_test(count) { + info("Wait for the install to be completed"); + const count = await deferredInstallCompleted.promise; is(count, 1, "1 Add-on should have been successfully installed"); PermissionTestUtils.remove("http://example.com", "install"); - Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS); + await SpecialPowers.popPrefEnv(); gBrowser.removeCurrentTab(); Harness.finish(); -} +}); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js index 727f13180b..489582dc0a 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_httphash5.js @@ -1,12 +1,21 @@ // ---------------------------------------------------------------------------- // Test that only the first HTTPS hash is used // This verifies bug 591070 -function test() { +add_task(async function test_only_first_https_hash_used() { // This test currently depends on InstallTrigger.install availability. setInstallTriggerPrefs(); - Harness.installEndedCallback = install_ended; - Harness.installsCompletedCallback = finish_test; + await SpecialPowers.pushPrefEnv({ + set: [[PREF_INSTALL_REQUIREBUILTINCERTS, false]], + }); + + const xpiFilePath = getTestFilePath("./amosigned.xpi"); + const xpiFileHash = await IOUtils.computeHexDigest(xpiFilePath, "sha256"); + + const deferredInstallCompleted = Promise.withResolvers(); + + Harness.installEndedCallback = (install, addon) => addon.uninstall(); + Harness.installsCompletedCallback = deferredInstallCompleted.resolve; Harness.setup(); PermissionTestUtils.add( @@ -14,10 +23,9 @@ function test() { "install", Services.perms.ALLOW_ACTION ); - Services.prefs.setBoolPref(PREF_INSTALL_REQUIREBUILTINCERTS, false); var url = "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs"; - url += "?sha1:ee95834ad862245a9ef99ccecc2a857cadc16404|"; + url += `?sha256:${xpiFileHash}|`; url += "https://example.com/browser/" + RELATIVE_DIR + "hashRedirect.sjs"; url += "?sha1:foobar|" + TESTROOT + "amosigned.xpi"; @@ -36,18 +44,14 @@ function test() { gBrowser, TESTROOT + "installtrigger.html?" + triggers ); -} - -function install_ended(install, addon) { - return addon.uninstall(); -} -function finish_test(count) { + info("Wait for the install to be completed"); + const count = await deferredInstallCompleted.promise; is(count, 1, "1 Add-on should have been successfully installed"); PermissionTestUtils.remove("http://example.com", "install"); - Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS); + await SpecialPowers.popPrefEnv(); gBrowser.removeCurrentTab(); Harness.finish(); -} +}); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js index c8d8532ed0..6d4014b7e4 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile3.js @@ -27,7 +27,7 @@ function test() { }); } -function allow_blocked(installInfo) { +function allow_blocked() { ok(true, "Seen blocked"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js index 771832a72b..96052129d4 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4.js @@ -40,7 +40,7 @@ function test() { ); } -function allow_blocked(installInfo) { +function allow_blocked() { ok(true, "Seen blocked"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4_postDownload.js b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4_postDownload.js index 8f8484a1c9..5e1707611d 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4_postDownload.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_localfile4_postDownload.js @@ -39,7 +39,7 @@ function test() { ); } -function allow_blocked(installInfo) { +function allow_blocked() { ok(true, "Seen blocked"); return false; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js b/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js index 946ad1dff7..8ab0194519 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_offline.js @@ -28,7 +28,7 @@ function test() { ); } -function download_progress(addon, value, maxValue) { +function download_progress() { try { // Tests always connect to localhost, and per bug 87717, localhost is now // reachable in offline mode. To avoid this, disable any proxy. 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 7edbf318a0..8b43cc1383 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_xorigin.js @@ -40,7 +40,7 @@ function test() { ); } -function install_blocked(installInfo) { +function install_blocked() { wasOriginBlocked = true; } diff --git a/toolkit/mozapps/extensions/test/xpinstall/head.js b/toolkit/mozapps/extensions/test/xpinstall/head.js index 33ac33c830..a114b6efcd 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/head.js +++ b/toolkit/mozapps/extensions/test/xpinstall/head.js @@ -133,7 +133,6 @@ var Harness = { Services.obs.addObserver(this, "addon-install-failed"); // For browser_auth tests which trigger auth dialogs. - Services.obs.addObserver(this, "tabmodal-dialog-loaded"); Services.obs.addObserver(this, "common-dialog-loaded"); this._boundWin = Cu.getWeakReference(win); // need this so our addon manager listener knows which window to use. @@ -157,7 +156,6 @@ var Harness = { Services.obs.removeObserver(self, "addon-install-blocked"); Services.obs.removeObserver(self, "addon-install-failed"); - Services.obs.removeObserver(self, "tabmodal-dialog-loaded"); Services.obs.removeObserver(self, "common-dialog-loaded"); AddonManager.removeInstallListener(self); @@ -512,7 +510,7 @@ var Harness = { // nsIObserver - observe(subject, topic, data) { + observe(subject, topic) { var installInfo = subject.wrappedJSObject; switch (topic) { case "addon-install-started": @@ -553,11 +551,6 @@ var Harness = { ); }, this); break; - case "tabmodal-dialog-loaded": - let browser = subject.ownerGlobal.gBrowser.selectedBrowser; - let prompt = browser.tabModalPromptBox.getPrompt(subject); - this.promptReady(prompt.Dialog); - break; case "common-dialog-loaded": this.promptReady(subject.Dialog); break; diff --git a/toolkit/mozapps/extensions/test/xpinstall/restartless.xpi b/toolkit/mozapps/extensions/test/xpinstall/restartless.xpi Binary files differdeleted file mode 100644 index 9fee8f60b1..0000000000 --- a/toolkit/mozapps/extensions/test/xpinstall/restartless.xpi +++ /dev/null diff --git a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html index 1b098d6948..40ebd7f0d8 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html +++ b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html @@ -10,7 +10,7 @@ <script type="text/javascript"> /* globals InstallTrigger */ /* exported startInstall */ -function installCallback(url, status) { +function installCallback() { document.location = "#foo"; dump("Sending InstallComplete\n"); |