summaryrefslogtreecommitdiffstats
path: root/toolkit/components/satchel/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /toolkit/components/satchel/test
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/satchel/test')
-rw-r--r--toolkit/components/satchel/test/browser/browser_close_tab.js5
-rw-r--r--toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js2
-rw-r--r--toolkit/components/satchel/test/test_form_submission.html16
-rw-r--r--toolkit/components/satchel/test/test_popup_enter_event.html4
-rw-r--r--toolkit/components/satchel/test/unit/test_db_corrupt.js2
5 files changed, 13 insertions, 16 deletions
diff --git a/toolkit/components/satchel/test/browser/browser_close_tab.js b/toolkit/components/satchel/test/browser/browser_close_tab.js
index 37962d37d8..f0ed806b3b 100644
--- a/toolkit/components/satchel/test/browser/browser_close_tab.js
+++ b/toolkit/components/satchel/test/browser/browser_close_tab.js
@@ -10,10 +10,7 @@ add_task(async function test() {
const url = `data:text/html,<input type="text" name="field1">`;
// Open a dummy tab.
- await BrowserTestUtils.withNewTab(
- { gBrowser, url },
- async function (browser) {}
- );
+ await BrowserTestUtils.withNewTab({ gBrowser, url }, async function () {});
await BrowserTestUtils.withNewTab(
{ gBrowser, url },
diff --git a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js b/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
index 3abc6ebe54..2cf755cd6b 100644
--- a/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
+++ b/toolkit/components/satchel/test/browser/browser_privbrowsing_perwindowpb.js
@@ -30,7 +30,7 @@ add_task(async function test() {
}
}
- function testOnWindow(aOptions, aCallback) {
+ function testOnWindow(aOptions) {
return BrowserTestUtils.openNewBrowserWindow(aOptions).then(win => {
windowsToClose.push(win);
return win;
diff --git a/toolkit/components/satchel/test/test_form_submission.html b/toolkit/components/satchel/test/test_form_submission.html
index d1c0542609..b838f138bc 100644
--- a/toolkit/components/satchel/test/test_form_submission.html
+++ b/toolkit/components/satchel/test/test_form_submission.html
@@ -306,10 +306,10 @@ function setScriptInput(formNumber, inputName, value) {
getFormElementByName(formNumber, inputName).value = value;
}
-function checkSubmitDoesNotSave(formNumber, inputName, value) {
- return new Promise((resolve, reject) => {
+function checkSubmitDoesNotSave(formNumber) {
+ return new Promise(resolve => {
const form = document.getElementById("form" + formNumber);
- form.addEventListener("submit", async e => {
+ form.addEventListener("submit", async () => {
const historyEntriesCount = await countEntries(null, null);
ok(!historyEntriesCount, form.getAttribute("purpose"));
resolve();
@@ -319,11 +319,11 @@ function checkSubmitDoesNotSave(formNumber, inputName, value) {
});
}
-function checkInvalidFirstInputDoesNotSave(formNumber, value) {
- return new Promise((resolve, reject) => {
+function checkInvalidFirstInputDoesNotSave(formNumber) {
+ return new Promise((resolve) => {
const form = document.getElementById("form" + formNumber);
const input = form.querySelector("input");
- input.addEventListener("invalid", async e => {
+ input.addEventListener("invalid", async _e => {
const historyEntriesCount = await countEntries(null, null);
ok(!historyEntriesCount, form.getAttribute("purpose"));
resolve();
@@ -479,12 +479,12 @@ add_task(async function form19_does_not_save() {
add_task(async function form20_does_not_save() {
setUserInput(20, "test1", "dontSaveThis");
- await checkInvalidFirstInputDoesNotSave(20, "invalid");
+ await checkInvalidFirstInputDoesNotSave(20);
});
add_task(async function form21_does_not_save() {
setUserInput(21, "test1", "dontSaveThis");
- await checkInvalidFirstInputDoesNotSave(21, "invalid");
+ await checkInvalidFirstInputDoesNotSave(21);
});
add_task(async function form22_does_not_save() {
diff --git a/toolkit/components/satchel/test/test_popup_enter_event.html b/toolkit/components/satchel/test/test_popup_enter_event.html
index 6150a8a57a..8dfbe71e67 100644
--- a/toolkit/components/satchel/test/test_popup_enter_event.html
+++ b/toolkit/components/satchel/test/test_popup_enter_event.html
@@ -49,11 +49,11 @@ add_task(async function popupEnterEvent() {
}
const submitTested = new Promise(resolve => {
- SpecialPowers.addSystemEventListener(input, "keypress", handleEnter, true);
+ SpecialPowers.wrap(input).addEventListener("keypress", handleEnter, { capture: true, mozSystemGroup: true });
form.addEventListener("submit", e => {
e.preventDefault();
is(input.value, expectedValue, "Check input value in the submit handler");
- SpecialPowers.removeSystemEventListener(input, "keypress", handleEnter, true);
+ SpecialPowers.wrap(input).removeEventListener("keypress", handleEnter, { capture: true, mozSystemGroup: true });
resolve();
}, { once: true });
});
diff --git a/toolkit/components/satchel/test/unit/test_db_corrupt.js b/toolkit/components/satchel/test/unit/test_db_corrupt.js
index b53b5cd6d0..df0d1fae51 100644
--- a/toolkit/components/satchel/test/unit/test_db_corrupt.js
+++ b/toolkit/components/satchel/test/unit/test_db_corrupt.js
@@ -52,7 +52,7 @@ add_test(function test_corruptFormHistoryDB_emptyInit() {
count = await FormHistory.count({ fieldname: "name-A", value: "value-A" });
Assert.equal(count, 0);
run_next_test();
- })().catch(error => {
+ })().catch(_error => {
do_throw("DB initialized after reading a corrupt DB file is not empty.");
});
});