diff options
Diffstat (limited to 'netwerk/test/unit/test_stale-while-revalidate_max-age-0.js')
-rw-r--r-- | netwerk/test/unit/test_stale-while-revalidate_max-age-0.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/netwerk/test/unit/test_stale-while-revalidate_max-age-0.js b/netwerk/test/unit/test_stale-while-revalidate_max-age-0.js index 01bb6639bc..c2b7809f07 100644 --- a/netwerk/test/unit/test_stale-while-revalidate_max-age-0.js +++ b/netwerk/test/unit/test_stale-while-revalidate_max-age-0.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 = 0; 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(2); @@ -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); }); |