Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js

Issue 1706863002: Add layout tests for Cache.matchAll() w/o parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update layout test results Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cachestorage/serviceworker/cache-matchAll-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 if (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('/resources/testharness.js'); 2 importScripts('/resources/testharness.js');
3 importScripts('/resources/testharness-helpers.js'); 3 importScripts('/resources/testharness-helpers.js');
4 importScripts('../resources/test-helpers.js'); 4 importScripts('../resources/test-helpers.js');
5 } 5 }
6 6
7 prepopulated_cache_test(simple_entries, function(cache, entries) { 7 prepopulated_cache_test(simple_entries, function(cache, entries) {
8 return cache.matchAll('not-present-in-the-cache') 8 return cache.matchAll('not-present-in-the-cache')
9 .then(function(result) { 9 .then(function(result) {
10 assert_response_array_equivalent( 10 assert_response_array_equivalent(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 prepopulated_cache_test(simple_entries, function(cache, entries) { 87 prepopulated_cache_test(simple_entries, function(cache, entries) {
88 return cache.matchAll('http') 88 return cache.matchAll('http')
89 .then(function(result) { 89 .then(function(result) {
90 assert_response_array_equivalent( 90 assert_response_array_equivalent(
91 result, [], 91 result, [],
92 'Cache.matchAll should treat query as a URL and not ' + 92 'Cache.matchAll should treat query as a URL and not ' +
93 'just a string fragment.'); 93 'just a string fragment.');
94 }); 94 });
95 }, 'Cache.matchAll with string fragment "http" as query'); 95 }, 'Cache.matchAll with string fragment "http" as query');
96 96
97 prepopulated_cache_test(simple_entries, function(cache, entries) {
98 return cache.matchAll()
99 .then(function(result) {
100 assert_response_array_equivalent(
101 result,
102 [
103 entries.a.response,
104 entries.b.response,
105 entries.a_with_query.response,
106 entries.A.response,
107 entries.a_https.response,
108 entries.a_org.response,
109 entries.cat.response,
110 entries.catmandu.response,
111 entries.cat_num_lives.response,
112 entries.cat_in_the_hat.response,
113 entries.non_2xx_response.response,
114 entries.error_response.response
115 ],
116 'Cache.matchAll without parameters should match all entries.');
117 });
118 }, 'Cache.matchAll without parameters');
119
97 prepopulated_cache_test(vary_entries, function(cache, entries) { 120 prepopulated_cache_test(vary_entries, function(cache, entries) {
98 return cache.matchAll('http://example.com/c') 121 return cache.matchAll('http://example.com/c')
99 .then(function(result) { 122 .then(function(result) {
100 assert_response_array_equivalent( 123 assert_response_array_equivalent(
101 result, 124 result,
102 [ 125 [
103 entries.vary_cookie_absent.response 126 entries.vary_cookie_absent.response
104 ], 127 ],
105 'Cache.matchAll should exclude matches if a vary header is ' + 128 'Cache.matchAll should exclude matches if a vary header is ' +
106 'missing in the query request, but is present in the cached ' + 129 'missing in the query request, but is present in the cached ' +
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 [ 168 [
146 entries.vary_cookie_is_cookie.response, 169 entries.vary_cookie_is_cookie.response,
147 entries.vary_cookie_is_good.response, 170 entries.vary_cookie_is_good.response,
148 entries.vary_cookie_absent.response 171 entries.vary_cookie_absent.response
149 ], 172 ],
150 'Cache.matchAll should honor "ignoreVary" parameter.'); 173 'Cache.matchAll should honor "ignoreVary" parameter.');
151 }); 174 });
152 }, 'Cache.matchAll with "ignoreVary" parameter'); 175 }, 'Cache.matchAll with "ignoreVary" parameter');
153 176
154 done(); 177 done();
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cachestorage/serviceworker/cache-matchAll-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698