summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/test/head.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/netmonitor/test/head.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 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.js18
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