mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 847863 - Part 5 of 8 - Selectively convert mixed content blocker tests. r=enn
This commit is contained in:
parent
b4fda55bf2
commit
196312742f
@ -44,9 +44,33 @@
|
||||
prefs.setBoolPref("manager.closeWhenDone", true);
|
||||
prefs.setBoolPref("manager.showWhenStarting", false);
|
||||
|
||||
var theWindow = window;
|
||||
|
||||
var useJSTransfer = false;
|
||||
try {
|
||||
useJSTransfer = prefs.getBoolPref("useJSTransfer");
|
||||
} catch (ex) { }
|
||||
|
||||
if (useJSTransfer) {
|
||||
Components.utils.import("resource://gre/modules/Downloads.jsm");
|
||||
Downloads.getPublicDownloadList().then(list => {
|
||||
list.addView({
|
||||
onDownloadAdded: function (aDownload) {
|
||||
list.removeView(this);
|
||||
aDownload.whenSucceeded().then(() => {
|
||||
list.removeFinished();
|
||||
theWindow.location = "bug383369step2.html";
|
||||
});
|
||||
},
|
||||
});
|
||||
window.location = "download.auto";
|
||||
}).then(null, Components.utils.reportError);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var downloadManager = Components.classes["@mozilla.org/download-manager;1"]
|
||||
.getService(Components.interfaces.nsIDownloadManager);
|
||||
var theWindow = window;
|
||||
var observer = {
|
||||
observe: function(subject, topic, data) {
|
||||
switch (topic) {
|
||||
|
Loading…
Reference in New Issue
Block a user