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

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

Issue 1832863002: [CacheStorage] Make CacheStorage::MatchAllCaches return in order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add layout test Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js
index a44dc85c6a410ef1135e23b3f992d74ba7d114e4..44e6541536b99cfc56637da1f3c9046c33502ae7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-matchAll.js
@@ -31,6 +31,23 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
}, 'Cache.matchAll with Request');
prepopulated_cache_test(simple_entries, function(cache, entries) {
+ var alt_response = new Response('', {status: 201});
+
+ return self.caches.open('second_matching_cache')
+ .then(function(cache) {
+ return cache.put(entries.a.request, alt_response.clone());
+ })
+ .then(function() {
+ return cache.matchAll(entries.a.request)
nhiroki 2016/03/25 14:48:35 I think you need to call |self.caches.match|. Can
jkarlin 2016/03/25 15:35:10 Thank you!! The name CacheStorage::MatchAllCache g
+ })
+ .then(function(result) {
+ assert_response_array_equals(
+ result, [entries.a.response],
+ 'Cache.matchAll should match the first cache.');
+ });
+ }, 'Cache.matchAll with multiple cache hits');
+
+prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(new Request(entries.a.request.url))
.then(function(result) {
assert_response_array_equals(

Powered by Google App Engine
This is Rietveld 408576698