mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 84ce41f8cec7 due to leak.
This commit is contained in:
parent
1436b47f87
commit
5b13e99185
@ -54,8 +54,6 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const URI_XPINSTALL_DIALOG = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
|
||||
|
||||
// Installation can begin from any of these states
|
||||
const READY_STATES = [
|
||||
AddonManager.STATE_AVAILABLE,
|
||||
@ -206,13 +204,8 @@ Installer.prototype = {
|
||||
args.installs = this.downloads;
|
||||
args.wrappedJSObject = args;
|
||||
|
||||
try {
|
||||
Services.ww.openWindow(this.window, URI_XPINSTALL_DIALOG,
|
||||
null, "chrome,modal,centerscreen", args);
|
||||
} catch (e) {
|
||||
this.downloads.forEach(function(aInstall) aInstall.cancel());
|
||||
notifyObservers("addon-install-failed", this.window, this.url, failed);
|
||||
}
|
||||
Services.ww.openWindow(this.window, "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul",
|
||||
null, "chrome,modal,centerscreen", args);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,6 @@ _BROWSER_FILES = head.js \
|
||||
browser_bug611242.js \
|
||||
browser_bug638292.js \
|
||||
browser_bug645699.js \
|
||||
browser_bug672485.js \
|
||||
unsigned.xpi \
|
||||
signed.xpi \
|
||||
signed2.xpi \
|
||||
|
@ -1,48 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
function test() {
|
||||
Harness.installConfirmCallback = confirm_install;
|
||||
Harness.installFailedCallback = failed_install;
|
||||
Harness.installEndedCallback = complete_install;
|
||||
Harness.installsCompletedCallback = finish_test;
|
||||
Harness.setup();
|
||||
|
||||
delete Services.ww;
|
||||
is(Services.ww, undefined, "Services.ww should now be undefined");
|
||||
|
||||
var pm = Services.perms;
|
||||
pm.add(makeURI("http://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
var triggers = encodeURIComponent(JSON.stringify({
|
||||
"Unsigned XPI": TESTROOT + "unsigned.xpi"
|
||||
}));
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.loadURI(TESTROOT + "installtrigger.html?" + triggers);
|
||||
}
|
||||
|
||||
function confirm_install(window) {
|
||||
ok(false, "Should not see the install dialog");
|
||||
return false;
|
||||
}
|
||||
|
||||
function failed_install() {
|
||||
ok(true, "Install should fail");
|
||||
}
|
||||
|
||||
function complete_install() {
|
||||
ok(false, "Install should not have completed");
|
||||
return false;
|
||||
}
|
||||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "0 Add-ons should have been successfully installed");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
Services.ww = Cc["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Ci.nsIWindowWatcher);
|
||||
|
||||
Harness.finish();
|
||||
}
|
Loading…
Reference in New Issue
Block a user