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 /dom/midi/tests | |
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 'dom/midi/tests')
-rw-r--r-- | dom/midi/tests/MIDITestUtils.js | 2 | ||||
-rw-r--r-- | dom/midi/tests/browser_midi_permission_gated.js | 2 | ||||
-rw-r--r-- | dom/midi/tests/browser_refresh_port_list.js | 12 | ||||
-rw-r--r-- | dom/midi/tests/test_midi_device_enumeration.html | 2 | ||||
-rw-r--r-- | dom/midi/tests/test_midi_device_explicit_open_close.html | 8 | ||||
-rw-r--r-- | dom/midi/tests/test_midi_device_pending.html | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/dom/midi/tests/MIDITestUtils.js b/dom/midi/tests/MIDITestUtils.js index 779a961991..b6d6fa301c 100644 --- a/dom/midi/tests/MIDITestUtils.js +++ b/dom/midi/tests/MIDITestUtils.js @@ -1,7 +1,7 @@ var MIDITestUtils = { permissionSetup: allow => { let permPromiseRes; - let permPromise = new Promise((res, rej) => { + let permPromise = new Promise(res => { permPromiseRes = res; }); SpecialPowers.pushPrefEnv( diff --git a/dom/midi/tests/browser_midi_permission_gated.js b/dom/midi/tests/browser_midi_permission_gated.js index 2bdce51a2d..d82ea87d6e 100644 --- a/dom/midi/tests/browser_midi_permission_gated.js +++ b/dom/midi/tests/browser_midi_permission_gated.js @@ -779,7 +779,7 @@ async function waitForNotification(notificationId) { let observerPromise; if (notificationId !== "addon-webext-permissions") { observerPromise = new Promise(resolve => { - Services.obs.addObserver(function observer(aSubject, aTopic, aData) { + Services.obs.addObserver(function observer(aSubject, aTopic) { // Ignore the progress notification unless that is the notification we want if ( notificationId != PROGRESS_NOTIFICATION && diff --git a/dom/midi/tests/browser_refresh_port_list.js b/dom/midi/tests/browser_refresh_port_list.js index 152b067254..7e2adffe5f 100644 --- a/dom/midi/tests/browser_refresh_port_list.js +++ b/dom/midi/tests/browser_refresh_port_list.js @@ -4,37 +4,37 @@ const EXAMPLE_ORG_URL = "https://example.org/browser/dom/midi/tests/"; const PAGE = "refresh_port_list.html"; -async function get_access(browser) { +async function get_access() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () { return content.wrappedJSObject.get_access(); }); } -async function reset_access(browser) { +async function reset_access() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () { return content.wrappedJSObject.reset_access(); }); } -async function get_num_ports(browser) { +async function get_num_ports() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () { return content.wrappedJSObject.get_num_ports(); }); } -async function add_port(browser) { +async function add_port() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { return content.wrappedJSObject.add_port(); }); } -async function remove_port(browser) { +async function remove_port() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { return content.wrappedJSObject.remove_port(); }); } -async function force_refresh(browser) { +async function force_refresh() { return SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { return content.wrappedJSObject.force_refresh(); }); diff --git a/dom/midi/tests/test_midi_device_enumeration.html b/dom/midi/tests/test_midi_device_enumeration.html index 1dab1c8cf7..48fe0c7d69 100644 --- a/dom/midi/tests/test_midi_device_enumeration.html +++ b/dom/midi/tests/test_midi_device_enumeration.html @@ -16,7 +16,7 @@ is(await props[prop], obj[prop], type + " property value " + prop + " is " + props[prop]); } }; - let failOnCall = (event) => { + let failOnCall = () => { ok(false, "No connect/state events should be received on startup!"); }; async function runTests () { diff --git a/dom/midi/tests/test_midi_device_explicit_open_close.html b/dom/midi/tests/test_midi_device_explicit_open_close.html index d3ed910a55..2fa682db5d 100644 --- a/dom/midi/tests/test_midi_device_explicit_open_close.html +++ b/dom/midi/tests/test_midi_device_explicit_open_close.html @@ -26,8 +26,8 @@ let input = access.inputs.get(await MIDITestUtils.inputInfo.id); let portEventRes; let accessEventRes; - let portEventPromise = new Promise((resolve, reject) => { portEventRes = resolve; }); - let accessEventPromise = new Promise((resolve, reject) => { accessEventRes = resolve; }); + let portEventPromise = new Promise((resolve) => { portEventRes = resolve; }); + let accessEventPromise = new Promise((resolve) => { accessEventRes = resolve; }); let shouldClose = false; let checkPort = (event) => { ok(input === event.port, "input port object and event port object are same object"); @@ -77,8 +77,8 @@ out_access.removeEventListener("statechange", outputEventHandler); } ok(true, "Starting MIDI port closing test"); - portEventPromise = new Promise((resolve, reject) => { portEventRes = resolve; }); - accessEventPromise = new Promise((resolve, reject) => { accessEventRes = resolve; }); + portEventPromise = new Promise((resolve) => { portEventRes = resolve; }); + accessEventPromise = new Promise((resolve) => { accessEventRes = resolve; }); input.addEventListener("statechange", inputEventHandler); access.addEventListener("statechange", accessEventHandler); shouldClose = true; diff --git a/dom/midi/tests/test_midi_device_pending.html b/dom/midi/tests/test_midi_device_pending.html index 2e6bd08420..d81bbaf894 100644 --- a/dom/midi/tests/test_midi_device_pending.html +++ b/dom/midi/tests/test_midi_device_pending.html @@ -25,8 +25,8 @@ let portPromise; function resetPromises() { - accessPromise = new Promise((res, rej) => { accessRes = res; }); - portPromise = new Promise((res, rej) => { portRes = res; }); + accessPromise = new Promise((res) => { accessRes = res; }); + portPromise = new Promise((res) => { portRes = res; }); } function accessStateChangeHandler(event) { |