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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/cache-storage/script-tests/cache-add.js

Issue 2610243002: Import wpt@5e1a3b80cea8d36774d2afd78b29a74792e9f15a (Closed)
Patch Set: Rebased Created 3 years, 11 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/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,

Powered by Google App Engine
This is Rietveld 408576698