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

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

Issue 1832863002: [CacheStorage] Make CacheStorage::MatchAllCaches return in order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 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-match.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
index ea0a2144aaf53ccb763af17a6b14b11fe8dcd7e9..755ccec43227b6d9f06ac3196304e2a76eb0e197 100644
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
@@ -29,6 +29,23 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
}, 'Cache.match 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.match(entries.a.request)
+ })
+ .then(function(result) {
+ assert_response_equals(
+ result, entries.a.response,
+ 'Cache.match should match the first cache.');
+ });
+ }, 'Cache.match with multiple cache hits');
+
+prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(new Request(entries.a.request.url))
.then(function(result) {
assert_response_equals(result, entries.a.response,

Powered by Google App Engine
This is Rietveld 408576698