Index: third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js |
index 2102d78f079a03052f17d639a7bd1262c005eab0..21517b1eccddcae9bca4349c282e3d942bdf9a8b 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-storage-match.js |
@@ -60,7 +60,7 @@ promise_test(function(test) { |
return Promise.all(test_cache_list.map(function(key) { |
return self.caches.open(key); |
})) |
- .then(function() { return caches.open('x'); }) |
+ .then(function() { return self.caches.open('x'); }) |
.then(function(cache) { |
return cache.put(transaction.request.clone(), |
transaction.response.clone()); |
@@ -93,13 +93,26 @@ cache_test(function(cache) { |
}); |
}, 'CacheStorageMatch a string request'); |
+cache_test(function(cache) { |
+ var transaction = create_unique_transaction(); |
+ return cache.put(transaction.request.clone(), transaction.response.clone()) |
+ .then(function() { |
+ return self.caches.match(new Request(transaction.request.url, |
+ {method: 'HEAD'})); |
+ }) |
+ .then(function(response) { |
+ assert_equals(response, undefined, |
+ 'A HEAD request should not be matched'); |
+ }); |
+}, 'CacheStorageMatch a HEAD request'); |
+ |
promise_test(function(test) { |
var transaction = create_unique_transaction(); |
return self.caches.match(transaction.request) |
.then(function(response) { |
assert_equals(response, undefined, |
'The response should not be found.'); |
- }) |
+ }); |
}, 'CacheStorageMatch with no cached entry'); |
promise_test(function(test) { |
@@ -117,7 +130,7 @@ promise_test(function(test) { |
}) |
.then(function(has_foo) { |
assert_false(has_foo, "The cache should still not exist."); |
- }) |
+ }); |
}, 'CacheStorageMatch with no caches available but name provided'); |
done(); |