summaryrefslogtreecommitdiffstats
path: root/browser/components/downloads/test
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/downloads/test')
-rw-r--r--browser/components/downloads/test/browser/browser_download_overwrite.js6
-rw-r--r--browser/components/downloads/test/browser/browser_downloads_panel_dontshow.js2
-rw-r--r--browser/components/downloads/test/browser/browser_downloads_panel_opens.js2
-rw-r--r--browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js2
-rw-r--r--browser/components/downloads/test/browser/browser_image_mimetype_issues.js6
-rw-r--r--browser/components/downloads/test/browser/browser_library_clearall.js2
-rw-r--r--browser/components/downloads/test/unit/test_DownloadsCommon_isFileOfType.js2
7 files changed, 11 insertions, 11 deletions
diff --git a/browser/components/downloads/test/browser/browser_download_overwrite.js b/browser/components/downloads/test/browser/browser_download_overwrite.js
index 7be16aa565..b1de07b5ed 100644
--- a/browser/components/downloads/test/browser/browser_download_overwrite.js
+++ b/browser/components/downloads/test/browser/browser_download_overwrite.js
@@ -5,11 +5,11 @@
const TEST_ROOT = getRootDirectory(gTestPath).replace(
"chrome://mochitests/content",
- "http://example.com"
+ "https://example.com"
);
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.init(window);
+MockFilePicker.init(window.browsingContext);
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/toolkit/content/tests/browser/common/mockTransfer.js",
@@ -31,7 +31,7 @@ add_setup(async function () {
let destDir = gTestTargetFile.parent;
MockFilePicker.displayDirectory = destDir;
- MockFilePicker.showCallback = function (fp) {
+ MockFilePicker.showCallback = function () {
MockFilePicker.setFiles([gTestTargetFile]);
return MockFilePicker.returnOK;
};
diff --git a/browser/components/downloads/test/browser/browser_downloads_panel_dontshow.js b/browser/components/downloads/test/browser/browser_downloads_panel_dontshow.js
index 28c7bc302f..240c90048e 100644
--- a/browser/components/downloads/test/browser/browser_downloads_panel_dontshow.js
+++ b/browser/components/downloads/test/browser/browser_downloads_panel_dontshow.js
@@ -2,7 +2,7 @@
// download occurs but not when a user manually saves a page.
let MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.init(window);
+MockFilePicker.init(window.browsingContext);
async function promiseDownloadFinished(list) {
return new Promise(resolve => {
diff --git a/browser/components/downloads/test/browser/browser_downloads_panel_opens.js b/browser/components/downloads/test/browser/browser_downloads_panel_opens.js
index 7c44939e59..f8e034aaa5 100644
--- a/browser/components/downloads/test/browser/browser_downloads_panel_opens.js
+++ b/browser/components/downloads/test/browser/browser_downloads_panel_opens.js
@@ -2,7 +2,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
let { MockFilePicker } = SpecialPowers;
-MockFilePicker.init(window);
+MockFilePicker.init(window.browsingContext);
registerCleanupFunction(() => MockFilePicker.cleanup());
/**
diff --git a/browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js b/browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js
index a1b82fb9c2..0e4b51a1a6 100644
--- a/browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js
+++ b/browser/components/downloads/test/browser/browser_iframe_gone_mid_download.js
@@ -22,7 +22,7 @@ function test_deleted_iframe(perSitePref, windowOptions = {}) {
ok(iframe.contentWindow, "iframe should have a window");
let gDownloadLastDir = new DownloadLastDir(iframe.contentWindow);
let cw = iframe.contentWindow;
- let promiseIframeWindowGone = new Promise((resolve, reject) => {
+ let promiseIframeWindowGone = new Promise(resolve => {
Services.obs.addObserver(function obs(subject, topic) {
if (subject == cw) {
Services.obs.removeObserver(obs, topic);
diff --git a/browser/components/downloads/test/browser/browser_image_mimetype_issues.js b/browser/components/downloads/test/browser/browser_image_mimetype_issues.js
index b893a26d89..0f6afef9b4 100644
--- a/browser/components/downloads/test/browser/browser_image_mimetype_issues.js
+++ b/browser/components/downloads/test/browser/browser_image_mimetype_issues.js
@@ -9,7 +9,7 @@ const TEST_ROOT = getRootDirectory(gTestPath).replace(
);
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.init(window);
+MockFilePicker.init(window.browsingContext);
/*
* Popular websites implement image optimization as serving files with
@@ -98,7 +98,7 @@ add_task(async function test_save_link_webp_with_jpeg_extension() {
add_task(async function test_save_page_on_image_document() {
await BrowserTestUtils.withNewTab(
`${TEST_ROOT}/not-really-a-jpeg.jpeg?convert=webp`,
- async browser => {
+ async () => {
await new Promise(resolve => {
MockFilePicker.showCallback = function (fp) {
ok(
@@ -119,7 +119,7 @@ add_task(async function test_save_page_on_image_document() {
* get it replaced with .jpeg.
*/
add_task(async function test_save_page_on_JPEG_image_document() {
- await BrowserTestUtils.withNewTab(`${TEST_ROOT}/blank.JPG`, async browser => {
+ await BrowserTestUtils.withNewTab(`${TEST_ROOT}/blank.JPG`, async () => {
await new Promise(resolve => {
MockFilePicker.showCallback = function (fp) {
ok(
diff --git a/browser/components/downloads/test/browser/browser_library_clearall.js b/browser/components/downloads/test/browser/browser_library_clearall.js
index 022d1b6977..e96ea9d3e3 100644
--- a/browser/components/downloads/test/browser/browser_library_clearall.js
+++ b/browser/components/downloads/test/browser/browser_library_clearall.js
@@ -22,7 +22,7 @@ function waitForChildren(element, callback) {
});
}
-async function waitForChildrenLength(element, length, callback) {
+async function waitForChildrenLength(element, length) {
if (element.childElementCount != length) {
await waitForChildren(element, () => element.childElementCount == length);
}
diff --git a/browser/components/downloads/test/unit/test_DownloadsCommon_isFileOfType.js b/browser/components/downloads/test/unit/test_DownloadsCommon_isFileOfType.js
index d965ac264a..c07a44673c 100644
--- a/browser/components/downloads/test/unit/test_DownloadsCommon_isFileOfType.js
+++ b/browser/components/downloads/test/unit/test_DownloadsCommon_isFileOfType.js
@@ -120,7 +120,7 @@ for (let testData of TESTCASES) {
/**
* Sanity test the DownloadsCommon.isFileOfType method with test parameters
*/
-async function test_isFileOfType({ name, typeArg, downloadProps, expected }) {
+async function test_isFileOfType({ typeArg, downloadProps, expected }) {
let download, result;
if (downloadProps) {
let downloadData = {