OLD | NEW |
1 if (self.importScripts) { | 1 if (self.importScripts) { |
2 importScripts('/resources/testharness.js'); | 2 importScripts('/resources/testharness.js'); |
3 importScripts('../resources/test-helpers.js'); | 3 importScripts('../resources/test-helpers.js'); |
4 } | 4 } |
5 | 5 |
6 prepopulated_cache_test(simple_entries, function(cache, entries) { | 6 prepopulated_cache_test(simple_entries, function(cache, entries) { |
7 return cache.matchAll('not-present-in-the-cache') | 7 return cache.matchAll('not-present-in-the-cache') |
8 .then(function(result) { | 8 .then(function(result) { |
9 assert_response_array_equivalent( | 9 assert_response_array_equivalent( |
10 result, [], | 10 result, [], |
(...skipping 21 matching lines...) Expand all Loading... |
32 prepopulated_cache_test(simple_entries, function(cache, entries) { | 32 prepopulated_cache_test(simple_entries, function(cache, entries) { |
33 return cache.matchAll(new Request(entries.a.request.url)) | 33 return cache.matchAll(new Request(entries.a.request.url)) |
34 .then(function(result) { | 34 .then(function(result) { |
35 assert_response_array_equals( | 35 assert_response_array_equals( |
36 result, [entries.a.response], | 36 result, [entries.a.response], |
37 'Cache.matchAll should match by Request.'); | 37 'Cache.matchAll should match by Request.'); |
38 }); | 38 }); |
39 }, 'Cache.matchAll with new Request'); | 39 }, 'Cache.matchAll with new Request'); |
40 | 40 |
41 prepopulated_cache_test(simple_entries, function(cache, entries) { | 41 prepopulated_cache_test(simple_entries, function(cache, entries) { |
| 42 return cache.matchAll(new Request(entries.a.request.url, {method: 'HEAD'}), |
| 43 {ignoreSearch: true}) |
| 44 .then(function(result) { |
| 45 assert_response_array_equals( |
| 46 result, [], |
| 47 'Cache.matchAll should not match HEAD Request.'); |
| 48 }); |
| 49 }, 'Cache.matchAll with HEAD'); |
| 50 |
| 51 prepopulated_cache_test(simple_entries, function(cache, entries) { |
42 return cache.matchAll(entries.a.request, | 52 return cache.matchAll(entries.a.request, |
43 {ignoreSearch: true}) | 53 {ignoreSearch: true}) |
44 .then(function(result) { | 54 .then(function(result) { |
45 assert_response_array_equivalent( | 55 assert_response_array_equivalent( |
46 result, | 56 result, |
47 [ | 57 [ |
48 entries.a.response, | 58 entries.a.response, |
49 entries.a_with_query.response | 59 entries.a_with_query.response |
50 ], | 60 ], |
51 'Cache.matchAll with ignoreSearch should ignore the ' + | 61 'Cache.matchAll with ignoreSearch should ignore the ' + |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 [ | 177 [ |
168 entries.vary_cookie_is_cookie.response, | 178 entries.vary_cookie_is_cookie.response, |
169 entries.vary_cookie_is_good.response, | 179 entries.vary_cookie_is_good.response, |
170 entries.vary_cookie_absent.response | 180 entries.vary_cookie_absent.response |
171 ], | 181 ], |
172 'Cache.matchAll should honor "ignoreVary" parameter.'); | 182 'Cache.matchAll should honor "ignoreVary" parameter.'); |
173 }); | 183 }); |
174 }, 'Cache.matchAll with "ignoreVary" parameter'); | 184 }, 'Cache.matchAll with "ignoreVary" parameter'); |
175 | 185 |
176 done(); | 186 done(); |
OLD | NEW |