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 /netwerk/test/unit/test_stale-while-revalidate_positive.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/test/unit/test_stale-while-revalidate_positive.js')
-rw-r--r-- | netwerk/test/unit/test_stale-while-revalidate_positive.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/netwerk/test/unit/test_stale-while-revalidate_positive.js b/netwerk/test/unit/test_stale-while-revalidate_positive.js index 51ce6bdd83..45dc0d305a 100644 --- a/netwerk/test/unit/test_stale-while-revalidate_positive.js +++ b/netwerk/test/unit/test_stale-while-revalidate_positive.js @@ -54,7 +54,11 @@ async function get_response(channel, fromCache) { return new Promise(resolve => { channel.asyncOpen( new ChannelListener((request, buffer, ctx, isFromCache) => { - ok(fromCache == isFromCache, `got response from cache = ${fromCache}`); + Assert.equal( + fromCache, + isFromCache, + `got response from cache = ${fromCache}` + ); resolve(buffer); }) ); @@ -91,7 +95,7 @@ add_task(async function () { version = 1; max_age = 1; response = await get_response(make_channel(URI), false); - ok(response == generate_response(1), "got response ver 1"); + Assert.equal(response, generate_response(1), "got response ver 1"); await sleep(max_age + 1); @@ -102,12 +106,12 @@ add_task(async function () { version = 2; max_age = 100; response = await get_response(make_channel(URI), true); - ok(response == generate_response(1), "got response ver 1"); + Assert.equal(response, generate_response(1), "got response ver 1"); await reval_done; response = await get_response(make_channel(URI), true); - ok(response == generate_response(2), "got response ver 2"); + Assert.equal(response, generate_response(2), "got response ver 2"); await stop_server(httpserver); }); |