Commit c2c9ca2d authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

Check cache.keys() when there are requests with VARY headers.

New test case added to existing cache-keys.https.html tests.

Bug: 831557
Change-Id: I26ba7b8fd616e4b7f9ab7382b42ef72c655dbfaf
Reviewed-on: https://chromium-review.googlesource.com/1156886Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580349}
parent 450b0990
......@@ -179,6 +179,20 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
});
}, 'Cache.keys without parameters');
prepopulated_cache_test(vary_entries, function(cache, entries) {
return cache.keys()
.then(function(result) {
assert_request_array_equals(
result,
[
entries.vary_cookie_is_cookie.request,
entries.vary_cookie_is_good.request,
entries.vary_cookie_absent.request,
],
'Cache.keys without parameters should match all entries.');
});
}, 'Cache.keys without parameters and VARY entries');
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.keys(new Request(entries.cat.request.url, {method: 'HEAD'}))
.then(function(result) {
......
This is a testharness.js-based test.
PASS Cache.keys
PASS Cache.keys() called on an empty cache
PASS Cache.keys with no matching entries
PASS Cache.keys with URL
PASS Cache.keys with Request
PASS Cache.keys with new Request
PASS Cache.keys with ignoreSearch option (request with no search parameters)
PASS Cache.keys with ignoreSearch option (request with search parameters)
PASS Cache.keys supports ignoreMethod
PASS Cache.keys supports ignoreVary
PASS Cache.keys with URL containing fragment
PASS Cache.keys with string fragment "http" as query
PASS Cache.keys without parameters
FAIL Cache.keys without parameters and VARY entries assert_equals: Cache.keys without parameters should match all entries. expected 3 but got 1
PASS Cache.keys with a HEAD Request
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Cache.keys() called on an empty cache
PASS Cache.keys with no matching entries
PASS Cache.keys with URL
PASS Cache.keys with Request
PASS Cache.keys with new Request
PASS Cache.keys with ignoreSearch option (request with no search parameters)
PASS Cache.keys with ignoreSearch option (request with search parameters)
PASS Cache.keys supports ignoreMethod
PASS Cache.keys supports ignoreVary
PASS Cache.keys with URL containing fragment
PASS Cache.keys with string fragment "http" as query
PASS Cache.keys without parameters
FAIL Cache.keys without parameters and VARY entries assert_equals: Cache.keys without parameters should match all entries. expected 3 but got 1
PASS Cache.keys with a HEAD Request
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Cache.keys() called on an empty cache
PASS Cache.keys with no matching entries
PASS Cache.keys with URL
PASS Cache.keys with Request
PASS Cache.keys with new Request
PASS Cache.keys with ignoreSearch option (request with no search parameters)
PASS Cache.keys with ignoreSearch option (request with search parameters)
PASS Cache.keys supports ignoreMethod
PASS Cache.keys supports ignoreVary
PASS Cache.keys with URL containing fragment
PASS Cache.keys with string fragment "http" as query
PASS Cache.keys without parameters
FAIL Cache.keys without parameters and VARY entries assert_equals: Cache.keys without parameters should match all entries. expected 3 but got 1
PASS Cache.keys with a HEAD Request
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment