diff options
Diffstat (limited to 'toolkit/mozapps/downloads')
7 files changed, 18 insertions, 32 deletions
diff --git a/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs b/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs index da0439dcc5..dfd5d2cd26 100644 --- a/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs +++ b/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs @@ -48,7 +48,7 @@ var observer = { "nsISupportsWeakReference", ]), - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { switch (aTopic) { case "last-pb-context-exited": gDownloadLastDirFile = null; diff --git a/toolkit/mozapps/downloads/DownloadUtils.sys.mjs b/toolkit/mozapps/downloads/DownloadUtils.sys.mjs index 3bf97f3c9e..6684a73699 100644 --- a/toolkit/mozapps/downloads/DownloadUtils.sys.mjs +++ b/toolkit/mozapps/downloads/DownloadUtils.sys.mjs @@ -610,7 +610,7 @@ function convertTimeUnitsUnits(timeValue, aIndex) { * Error message to log or an array of strings to concat */ // function log(aMsg) { -// let msg = "DownloadUtils.jsm: " + (aMsg.join ? aMsg.join("") : aMsg); +// let msg = "DownloadUtils.sys.mjs: " + (aMsg.join ? aMsg.join("") : aMsg); // Services.console.logStringMessage(msg); // dump(msg + "\n"); // } diff --git a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs index 66f77d38e4..01d1a518d8 100644 --- a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs +++ b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs @@ -72,33 +72,19 @@ nsUnknownContentTypeDialogProgressListener.prototype = { }, // Ignore onProgressChange, onProgressChange64, onStateChange, onLocationChange, onSecurityChange, onContentBlockingEvent and onRefreshAttempted notifications. - onProgressChange( - aWebProgress, - aRequest, - aCurSelfProgress, - aMaxSelfProgress, - aCurTotalProgress, - aMaxTotalProgress - ) {}, + onProgressChange() {}, - onProgressChange64( - aWebProgress, - aRequest, - aCurSelfProgress, - aMaxSelfProgress, - aCurTotalProgress, - aMaxTotalProgress - ) {}, + onProgressChange64() {}, - onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {}, + onStateChange() {}, - onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {}, + onLocationChange() {}, - onSecurityChange(aWebProgress, aRequest, aState) {}, + onSecurityChange() {}, - onContentBlockingEvent(aWebProgress, aRequest, aEvent) {}, + onContentBlockingEvent() {}, - onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI) { + onRefreshAttempted() { return true; }, }; @@ -309,7 +295,7 @@ nsUnknownContentTypeDialog.prototype = { var picker = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); var windowTitle = bundle.GetStringFromName("saveDialogTitle"); - picker.init(parent, windowTitle, nsIFilePicker.modeSave); + picker.init(parent.browsingContext, windowTitle, nsIFilePicker.modeSave); if (aDefaultFileName) { picker.defaultString = this.getFinalLeafName(aDefaultFileName); } @@ -1270,7 +1256,7 @@ nsUnknownContentTypeDialog.prototype = { var nsIFilePicker = Ci.nsIFilePicker; var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker); fp.init( - this.mDialog, + this.mDialog.browsingContext, this.dialogElement("strings").getString("chooseAppFilePickerTitle"), nsIFilePicker.modeOpen ); diff --git a/toolkit/mozapps/downloads/tests/browser/browser_save_wrongextension.js b/toolkit/mozapps/downloads/tests/browser/browser_save_wrongextension.js index 83e668076a..ad83bb3689 100644 --- a/toolkit/mozapps/downloads/tests/browser/browser_save_wrongextension.js +++ b/toolkit/mozapps/downloads/tests/browser/browser_save_wrongextension.js @@ -8,7 +8,7 @@ let url = "data:text/html,<a id='link' href='http://localhost:8000/thefile.js'>Link</a>"; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); let httpServer = null; diff --git a/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js b/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js index 06a5a9d238..9bd494e245 100644 --- a/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js +++ b/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js @@ -13,14 +13,14 @@ let UCTObserver = { opened: Promise.withResolvers(), closed: Promise.withResolvers(), - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { let win = aSubject; switch (aTopic) { case "domwindowopened": win.addEventListener( "load", - function onLoad(event) { + function onLoad() { // Let the dialog initialize SimpleTest.executeSoon(function () { UCTObserver.opened.resolve(win); @@ -40,7 +40,7 @@ let UCTObserver = { }; function waitDelay(delay) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { /* eslint-disable mozilla/no-arbitrary-setTimeout */ window.setTimeout(resolve, delay); }); diff --git a/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_dialog_layout.js b/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_dialog_layout.js index 6755c1aadb..e42951696d 100644 --- a/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_dialog_layout.js +++ b/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_dialog_layout.js @@ -38,14 +38,14 @@ add_task(async function test_unknownContentType_dialog_layout() { opened: Promise.withResolvers(), closed: Promise.withResolvers(), - observe(aSubject, aTopic, aData) { + observe(aSubject, aTopic) { let win = aSubject; switch (aTopic) { case "domwindowopened": win.addEventListener( "load", - function onLoad(event) { + function onLoad() { // Let the dialog initialize SimpleTest.executeSoon(function () { UCTObserver.opened.resolve(win); diff --git a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js b/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js index 786da28b75..9076fa7c76 100644 --- a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js +++ b/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js @@ -20,7 +20,7 @@ const { DownloadUtils } = ChromeUtils.importESModule( * @usage _("Hello World") -> prints "Hello World" * @usage _(1, 2, 3) -> prints "1 2 3" */ -var _ = function (some, debug, text, to) { +var _ = function () { print(Array.from(arguments).join(" ")); }; |