diff options
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); }); |