diff options
Diffstat (limited to 'remote/shared/listeners')
4 files changed, 12 insertions, 33 deletions
diff --git a/remote/shared/listeners/ContextualIdentityListener.sys.mjs b/remote/shared/listeners/ContextualIdentityListener.sys.mjs index d93b44ed77..42954d223c 100644 --- a/remote/shared/listeners/ContextualIdentityListener.sys.mjs +++ b/remote/shared/listeners/ContextualIdentityListener.sys.mjs @@ -49,7 +49,7 @@ export class ContextualIdentityListener { this.stopListening(); } - observe(subject, topic, data) { + observe(subject, topic) { switch (topic) { case OBSERVER_TOPIC_CREATED: this.emit("created", { identity: subject.wrappedJSObject }); diff --git a/remote/shared/listeners/NetworkEventRecord.sys.mjs b/remote/shared/listeners/NetworkEventRecord.sys.mjs index a41f3edd7d..72b43e3de1 100644 --- a/remote/shared/listeners/NetworkEventRecord.sys.mjs +++ b/remote/shared/listeners/NetworkEventRecord.sys.mjs @@ -163,13 +163,8 @@ export class NetworkEventRecord { * Required API for a NetworkObserver event owner. * * Not used for RemoteAgent. - * - * @param {object} info - * The object containing security information. - * @param {boolean} isRacing - * True if the corresponding channel raced the cache and network requests. */ - addSecurityInfo(info, isRacing) {} + addSecurityInfo() {} /** * Add network event timings. @@ -177,15 +172,8 @@ export class NetworkEventRecord { * Required API for a NetworkObserver event owner. * * Not used for RemoteAgent. - * - * @param {number} total - * The total time for the request. - * @param {object} timings - * The har-like timings. - * @param {object} offsets - * The har-like timings, but as offset from the request start. */ - addEventTimings(total, timings, offsets) {} + addEventTimings() {} /** * Add response cache entry. @@ -193,11 +181,8 @@ export class NetworkEventRecord { * Required API for a NetworkObserver event owner. * * Not used for RemoteAgent. - * - * @param {object} options - * An object which contains a single responseCache property. */ - addResponseCache(options) {} + addResponseCache() {} /** * Add response content. @@ -233,11 +218,8 @@ export class NetworkEventRecord { * Required API for a NetworkObserver event owner. * * Not used for RemoteAgent. - * - * @param {Array} serverTimings - * The server timings. */ - addServerTimings(serverTimings) {} + addServerTimings() {} /** * Add service worker timings. @@ -245,11 +227,8 @@ export class NetworkEventRecord { * Required API for a NetworkObserver event owner. * * Not used for RemoteAgent. - * - * @param {object} serviceWorkerTimings - * The server timings. */ - addServiceWorkerTimings(serviceWorkerTimings) {} + addServiceWorkerTimings() {} onAuthPrompt(authDetails, authCallbacks) { this.#emitAuthRequired(authCallbacks); diff --git a/remote/shared/listeners/test/browser/browser_NetworkListener.js b/remote/shared/listeners/test/browser/browser_NetworkListener.js index 78865f6b80..cc1b42f2fc 100644 --- a/remote/shared/listeners/test/browser/browser_NetworkListener.js +++ b/remote/shared/listeners/test/browser/browser_NetworkListener.js @@ -32,22 +32,22 @@ add_task(async function test_beforeRequestSent() { listener.startListening(); await fetch(tab1.linkedBrowser, "https://example.com/?1"); - ok(events.length == 1, "One event was received"); + Assert.equal(events.length, 1, "One event was received"); assertNetworkEvent(events[0], contextId1, "https://example.com/?1"); info("Check that events are no longer emitted after calling stopListening"); listener.stopListening(); await fetch(tab1.linkedBrowser, "https://example.com/?2"); - ok(events.length == 1, "No new event was received"); + Assert.equal(events.length, 1, "No new event was received"); listener.startListening(); await fetch(tab1.linkedBrowser, "https://example.com/?3"); - ok(events.length == 2, "A new event was received"); + Assert.equal(events.length, 2, "A new event was received"); assertNetworkEvent(events[1], contextId1, "https://example.com/?3"); info("Check network event from the new tab"); await fetch(tab2.linkedBrowser, "https://example.com/?4"); - ok(events.length == 3, "A new event was received"); + Assert.equal(events.length, 3, "A new event was received"); assertNetworkEvent(events[2], contextId2, "https://example.com/?4"); gBrowser.removeTab(tab1); diff --git a/remote/shared/listeners/test/browser/browser_PromptListener.js b/remote/shared/listeners/test/browser/browser_PromptListener.js index 0d3f23db3f..30503ef4fa 100644 --- a/remote/shared/listeners/test/browser/browser_PromptListener.js +++ b/remote/shared/listeners/test/browser/browser_PromptListener.js @@ -156,7 +156,7 @@ add_task(async function test_events_in_another_browser() { await createScriptNode(`setTimeout(() => window.confirm('test'))`); const dialogWin = await dialogPromise; - ok(events.length === 0, "No event was received"); + Assert.strictEqual(events.length, 0, "No event was received"); dialogWin.document.querySelector("dialog").acceptDialog(); @@ -166,7 +166,7 @@ add_task(async function test_events_in_another_browser() { setTimeout(resolve, 500); }); - ok(events.length === 0, "No event was received"); + Assert.strictEqual(events.length, 0, "No event was received"); listener.destroy(); await BrowserTestUtils.closeWindow(win); |