diff options
Diffstat (limited to 'remote/shared/listeners/test/browser')
-rw-r--r-- | remote/shared/listeners/test/browser/browser_NetworkListener.js | 8 | ||||
-rw-r--r-- | remote/shared/listeners/test/browser/browser_PromptListener.js | 4 |
2 files changed, 6 insertions, 6 deletions
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); |