summaryrefslogtreecommitdiffstats
path: root/dom/filesystem/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /dom/filesystem/tests
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/filesystem/tests')
-rw-r--r--dom/filesystem/tests/script_fileList.js4
-rw-r--r--dom/filesystem/tests/script_promptHandler.js6
-rw-r--r--dom/filesystem/tests/test_basic.html2
-rw-r--r--dom/filesystem/tests/test_webkitdirectory.html10
4 files changed, 11 insertions, 11 deletions
diff --git a/dom/filesystem/tests/script_fileList.js b/dom/filesystem/tests/script_fileList.js
index 47438aa7b3..2730a96261 100644
--- a/dom/filesystem/tests/script_fileList.js
+++ b/dom/filesystem/tests/script_fileList.js
@@ -153,7 +153,7 @@ addMessageListener("dir.open", function (e) {
});
});
-addMessageListener("file.open", function (e) {
+addMessageListener("file.open", function () {
var testFile = Services.dirsvc
.QueryInterface(Ci.nsIProperties)
.get("ProfD", Ci.nsIFile);
@@ -164,7 +164,7 @@ addMessageListener("file.open", function (e) {
});
});
-addMessageListener("symlink.open", function (e) {
+addMessageListener("symlink.open", function () {
let testDir = createTestFile();
let testFile = testDir.clone();
testFile.append("subdir");
diff --git a/dom/filesystem/tests/script_promptHandler.js b/dom/filesystem/tests/script_promptHandler.js
index ed3bda7404..235842b455 100644
--- a/dom/filesystem/tests/script_promptHandler.js
+++ b/dom/filesystem/tests/script_promptHandler.js
@@ -2,17 +2,17 @@
let dialogObserverTopic = "common-dialog-loaded";
-function dialogObserver(subj, topic, data) {
+function dialogObserver(subj) {
subj.document.querySelector("dialog").acceptDialog();
sendAsyncMessage("promptAccepted");
}
-addMessageListener("init", message => {
+addMessageListener("init", () => {
Services.obs.addObserver(dialogObserver, dialogObserverTopic);
sendAsyncMessage("initDone");
});
-addMessageListener("cleanup", message => {
+addMessageListener("cleanup", () => {
Services.obs.removeObserver(dialogObserver, dialogObserverTopic);
sendAsyncMessage("cleanupDone");
});
diff --git a/dom/filesystem/tests/test_basic.html b/dom/filesystem/tests/test_basic.html
index b4daea79c9..a0464f631e 100644
--- a/dom/filesystem/tests/test_basic.html
+++ b/dom/filesystem/tests/test_basic.html
@@ -40,7 +40,7 @@ function create_fileList(aPath) {
script.sendAsyncMessage("dir.open", { path: aPath });
}
-function test_simpleFilePicker(aPath) {
+function test_simpleFilePicker() {
var url = SimpleTest.getTestFileURL("script_fileList.js");
var script = SpecialPowers.loadChromeScript(url);
diff --git a/dom/filesystem/tests/test_webkitdirectory.html b/dom/filesystem/tests/test_webkitdirectory.html
index 50080ad7ba..982887cbcf 100644
--- a/dom/filesystem/tests/test_webkitdirectory.html
+++ b/dom/filesystem/tests/test_webkitdirectory.html
@@ -48,7 +48,7 @@ function populateInputFile(aInputFile) {
var script = SpecialPowers.loadChromeScript(url);
var MockFilePicker = SpecialPowers.MockFilePicker;
- MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
+ MockFilePicker.init(SpecialPowers.wrap(window).browsingContext, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
async function onOpened(message) {
MockFilePicker.useDirectory(message.dir);
@@ -134,7 +134,7 @@ async function test_individualSymlink(aInputFile) {
// -- Have the picker pick it
var MockFilePicker = SpecialPowers.MockFilePicker;
- MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeOpen);
+ MockFilePicker.init(SpecialPowers.wrap(window).browsingContext, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeOpen);
MockFilePicker.displayDirectory = dir;
let pickerShown = new Promise(resolve => {
@@ -186,7 +186,7 @@ function test_changeDataWhileWorking() {
var script = SpecialPowers.loadChromeScript(url);
var MockFilePicker = SpecialPowers.MockFilePicker;
- MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
+ MockFilePicker.init(SpecialPowers.wrap(window).browsingContext, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
let promptHandled;
// Let's start retrieving the root nsIFile object
@@ -203,7 +203,7 @@ function test_changeDataWhileWorking() {
// input.click() pointing to the root dir
.then(async function(aDir) {
MockFilePicker.cleanup();
- MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
+ MockFilePicker.init(SpecialPowers.wrap(window).browsingContext, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
MockFilePicker.useDirectory(aDir);
var input = document.getElementById("inputFileDirectoryChange");
@@ -228,7 +228,7 @@ function test_changeDataWhileWorking() {
// Now let's click again and wait for onchange.
.then(async function(aDir) {
MockFilePicker.cleanup();
- MockFilePicker.init(window, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
+ MockFilePicker.init(SpecialPowers.wrap(window).browsingContext, "A Mock File Picker", SpecialPowers.Ci.nsIFilePicker.modeGetFolder);
MockFilePicker.useDirectory(aDir);
let input = document.getElementById("inputFileDirectoryChange");