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 /devtools/client/netmonitor/test/head.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-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 'devtools/client/netmonitor/test/head.js')
-rw-r--r-- | devtools/client/netmonitor/test/head.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/devtools/client/netmonitor/test/head.js b/devtools/client/netmonitor/test/head.js index 5ca3466964..b171b51715 100644 --- a/devtools/client/netmonitor/test/head.js +++ b/devtools/client/netmonitor/test/head.js @@ -878,7 +878,7 @@ function testFilterButtonsCustom(monitor, isChecked) { * */ function promiseXHR(data) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { const xhr = new content.XMLHttpRequest(); const method = data.method || "GET"; @@ -891,7 +891,7 @@ function promiseXHR(data) { xhr.addEventListener( "loadend", - function (event) { + function () { resolve({ status: xhr.status, response: xhr.response }); }, { once: true } @@ -925,7 +925,7 @@ function promiseXHR(data) { * */ function promiseWS(data) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { let url = data.url; if (data.nocache) { @@ -936,7 +936,7 @@ function promiseWS(data) { const socket = new content.WebSocket(url); /* Since we only use HTTP server to mock websocket, so just ignore the error */ - socket.onclose = e => { + socket.onclose = () => { socket.close(); resolve({ status: 101, @@ -944,7 +944,7 @@ function promiseWS(data) { }); }; - socket.onerror = e => { + socket.onerror = () => { socket.close(); resolve({ status: 101, @@ -1156,7 +1156,11 @@ function checkTelemetryEvent(expectedEvent, query) { is(events.length, 1, "There was only 1 event logged"); const [event] = events; - ok(event.session_id > 0, "There is a valid session_id in the logged event"); + Assert.greater( + Number(event.session_id), + 0, + "There is a valid session_id in the logged event" + ); const f = e => JSON.stringify(e, null, 2); is( @@ -1391,7 +1395,7 @@ function clickElement(element, monitor) { * Target browser to observe the favicon load. */ function registerFaviconNotifier(browser) { - const listener = async (name, data) => { + const listener = async name => { if (name == "SetIcon" || name == "SetFailedIcon") { await SpecialPowers.spawn(browser, [], async () => { content.document |