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_negative.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_negative.js')
-rw-r--r-- | netwerk/test/unit/test_stale-while-revalidate_negative.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/netwerk/test/unit/test_stale-while-revalidate_negative.js b/netwerk/test/unit/test_stale-while-revalidate_negative.js index c9ef87e2dd..1715cdbc1a 100644 --- a/netwerk/test/unit/test_stale-while-revalidate_negative.js +++ b/netwerk/test/unit/test_stale-while-revalidate_negative.js @@ -49,7 +49,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); }) ); @@ -80,13 +84,13 @@ 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 /* stale window */ + 1 /* to expire the window */); version = 2; response = await get_response(make_channel(URI), false); - ok(response == generate_response(2), "got response ver 2"); + Assert.equal(response, generate_response(2), "got response ver 2"); await stop_server(httpserver); }); |