diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /toolkit/components/satchel/test | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/satchel/test')
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."); }); }); |