summaryrefslogtreecommitdiffstats
path: root/dom/midi
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/midi
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.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')
-rw-r--r--dom/midi/MIDIPort.cpp4
-rw-r--r--dom/midi/tests/MIDITestUtils.js2
-rw-r--r--dom/midi/tests/browser_midi_permission_gated.js2
-rw-r--r--dom/midi/tests/browser_refresh_port_list.js12
-rw-r--r--dom/midi/tests/test_midi_device_enumeration.html2
-rw-r--r--dom/midi/tests/test_midi_device_explicit_open_close.html8
-rw-r--r--dom/midi/tests/test_midi_device_pending.html4
7 files changed, 17 insertions, 17 deletions
diff --git a/dom/midi/MIDIPort.cpp b/dom/midi/MIDIPort.cpp
index 3d75bf2d63..94d7280c73 100644
--- a/dom/midi/MIDIPort.cpp
+++ b/dom/midi/MIDIPort.cpp
@@ -104,14 +104,14 @@ bool MIDIPort::Initialize(const MIDIPortInfo& aPortInfo, bool aSysexEnabled,
mPortHolder.Init(port.forget());
LOG("MIDIPort::Initialize (%s, %s)",
NS_ConvertUTF16toUTF8(Port()->Name()).get(),
- MIDIPortTypeValues::strings[uint32_t(Port()->Type())].value);
+ GetEnumString(Port()->Type()).get());
return true;
}
void MIDIPort::UnsetIPCPort() {
LOG("MIDIPort::UnsetIPCPort (%s, %s)",
NS_ConvertUTF16toUTF8(Port()->Name()).get(),
- MIDIPortTypeValues::strings[uint32_t(Port()->Type())].value);
+ GetEnumString(Port()->Type()).get());
mPortHolder.Clear();
}
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) {