Index: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js |
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js |
index c41c7bcef771d68b9a90a322f9770f40fe3a2aaa..237ba473504c359bb98eea363a127e9d26ee1609 100644 |
--- a/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js |
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js |
@@ -84,6 +84,26 @@ cache_test(function(cache) { |
}, 'Cache.add with request with null body (not consumed)'); |
cache_test(function(cache, test) { |
+ return assert_promise_rejects( |
+ test, |
+ new TypeError(), |
+ cache.add('../resources/fetch-status.py?status=206'), |
+ 'Cache.add should reject on partial response'); |
+ }, 'Cache.add with 206 response'); |
+ |
+cache_test(function(cache, test) { |
+ var urls = ['../resources/fetch-status.py?status=206', |
+ '../resources/fetch-status.py?status=200']; |
+ var requests = urls.map(function(url) { |
+ return new Request(url); |
+ }); |
+ return promise_rejects( |
+ new TypeError(), |
+ cache.addAll(requests), |
+ 'Cache.addAll should reject with TypeError if any request fails'); |
+ }, 'Cache.addAll with 206 response'); |
+ |
+cache_test(function(cache, test) { |
return promise_rejects( |
test, |
new TypeError(), |
@@ -91,6 +111,7 @@ cache_test(function(cache, test) { |
'Cache.add should reject if response is !ok'); |
}, 'Cache.add with request that results in a status of 404'); |
+ |
cache_test(function(cache, test) { |
return promise_rejects( |
test, |