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

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

Issue 2204683002: Cache API should not match() HEAD requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: HEAD -> Head Created 4 years, 4 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 8f1f288f87d15b24fc8ba6d4246b6cda62232120..7002fba54a68a17c99e285f4d8bab63a7ff076b4 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
@@ -53,6 +53,14 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
}, 'Cache.match with new Request');
prepopulated_cache_test(simple_entries, function(cache, entries) {
+ return cache.match(new Request(entries.a.request.url, {method: 'HEAD'}))
+ .then(function(result) {
+ assert_equals(result, undefined,
+ 'Cache.match should not match HEAD Request.');
+ });
+ }, 'Cache.match with HEAD');
+
+prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.a.request,
{ignoreSearch: true})
.then(function(result) {

Powered by Google App Engine
This is Rietveld 408576698