diff options
Diffstat (limited to 'uriloader/exthandler/tests/mochitest/browser_save_filenames.js')
-rw-r--r-- | uriloader/exthandler/tests/mochitest/browser_save_filenames.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/uriloader/exthandler/tests/mochitest/browser_save_filenames.js b/uriloader/exthandler/tests/mochitest/browser_save_filenames.js index 46750d5c87..984d0dea21 100644 --- a/uriloader/exthandler/tests/mochitest/browser_save_filenames.js +++ b/uriloader/exthandler/tests/mochitest/browser_save_filenames.js @@ -55,7 +55,7 @@ const DEFAULT_FILENAME = const PROMISE_FILENAME_TYPE = "application/x-moz-file-promise-dest-filename"; let MockFilePicker = SpecialPowers.MockFilePicker; -MockFilePicker.init(window); +MockFilePicker.init(window.browsingContext); let expectedItems; let sendAsAttachment = false; @@ -240,7 +240,7 @@ add_task(async function save_document() { tmpDir.append(baseFilename + "_document_files"); MockFilePicker.displayDirectory = tmpDir; - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { MockFilePicker.setFiles([tmpFile]); MockFilePicker.filterIndex = 0; // kSaveAsType_Complete }; @@ -280,8 +280,9 @@ add_task(async function save_document() { fileIdx = filesSaved.indexOf(filename); } - ok( - fileIdx >= 0, + Assert.greaterOrEqual( + fileIdx, + 0, "file i" + idx + " " + @@ -562,7 +563,7 @@ add_task(async function saveas_files_modified_in_filepicker() { await new Promise(resolve => { MockFilePicker.displayDirectory = savedFile; - MockFilePicker.showCallback = function (fp) { + MockFilePicker.showCallback = function () { MockFilePicker.filterIndex = 0; // kSaveAsType_Complete savedFile.append(items[idx].pickedfilename); MockFilePicker.setFiles([savedFile]); |