diff options
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpinstall/head.js')
-rw-r--r-- | toolkit/mozapps/extensions/test/xpinstall/head.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/toolkit/mozapps/extensions/test/xpinstall/head.js b/toolkit/mozapps/extensions/test/xpinstall/head.js index 197fe3fac..90db29924 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/head.js +++ b/toolkit/mozapps/extensions/test/xpinstall/head.js @@ -8,7 +8,6 @@ const ADDONS_URL = "chrome://mozapps/content/extensions/extensions.xul"; const PREF_LOGGING_ENABLED = "extensions.logging.enabled"; const PREF_INSTALL_REQUIREBUILTINCERTS = "extensions.install.requireBuiltInCerts"; const PREF_INSTALL_REQUIRESECUREORIGIN = "extensions.install.requireSecureOrigin"; -const PREF_CUSTOM_CONFIRMATION_UI = "xpinstall.customConfirmationUI"; const CHROME_NAME = "mochikit"; function getChromeRoot(path) { @@ -28,11 +27,6 @@ function extractChromeRoot(path) { return chromeRootPath; } -Services.prefs.setBoolPref(PREF_CUSTOM_CONFIRMATION_UI, false); -registerCleanupFunction(() => { - Services.prefs.clearUserPref(PREF_CUSTOM_CONFIRMATION_UI); -}); - /** * This is a test harness designed to handle responding to UI during the process * of installing an XPI. A test can set callbacks to hear about specific parts @@ -174,7 +168,7 @@ var Harness = { this.runningInstalls = null; if (callback) - executeSoon(() => callback(count)); + callback(count); }, // Window open handling @@ -244,8 +238,6 @@ var Harness = { ok(!!this.installDisabledCallback, "Installation shouldn't have been disabled"); if (this.installDisabledCallback) this.installDisabledCallback(installInfo); - this.expectingCancelled = true; - this.expectingCancelled = false; this.endTest(); }, @@ -307,17 +299,15 @@ var Harness = { if (this.finalContentEvent && !this.waitingForEvent) { this.waitingForEvent = true; info("Waiting for " + this.finalContentEvent); - let mm = gBrowser.selectedBrowser.messageManager; - mm.loadFrameScript(`data:,content.addEventListener("${this.finalContentEvent}", () => { sendAsyncMessage("Test:GotNewInstallEvent"); });`, false); let win = gBrowser.contentWindow; let listener = () => { info("Saw " + this.finalContentEvent); - mm.removeMessageListener("Test:GotNewInstallEvent", listener); + win.removeEventListener(this.finalContentEvent, listener, false); this.waitingForEvent = false; if (this.pendingCount == 0) this.endTest(); } - mm.addMessageListener("Test:GotNewInstallEvent", listener); + win.addEventListener(this.finalContentEvent, listener, false); } }, |