diff options
Diffstat (limited to 'uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js')
-rw-r--r-- | uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js b/uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js index 6bf375dfff..38cca8530d 100644 --- a/uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js +++ b/uriloader/exthandler/tests/mochitest/browser_shows_where_to_save_dialog.js @@ -16,7 +16,7 @@ const { handleInternally, useHelperApp, useSystemDefault, saveToDisk } = Ci.nsIHandlerInfo; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); add_setup(async function () { await SpecialPowers.pushPrefEnv({ @@ -50,7 +50,7 @@ add_task(async function aDownloadSavedToDiskPromptsForFolder() { await publicList.removeFinished(); }); let filePickerShownPromise = new Promise(resolve => { - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { setTimeout(resolve, 0); return Ci.nsIFilePicker.returnCancel; }; @@ -81,7 +81,7 @@ add_task(async function testFilesHandledInternally() { ); let filePickerShown = false; - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { filePickerShown = true; return Ci.nsIFilePicker.returnCancel; }; @@ -120,7 +120,7 @@ add_task(async function testFilesHandledBySystemDefaultApp() { ensureMIMEState({ preferredAction: useSystemDefault }); let filePickerShown = false; - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { filePickerShown = true; return Ci.nsIFilePicker.returnCancel; }; @@ -178,7 +178,7 @@ add_task(async function testFilesHandledByHelperApp() { }); let filePickerShown = false; - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { filePickerShown = true; return Ci.nsIFilePicker.returnCancel; }; |