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

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

Issue 2204573002: Cache API should reject 206 Partial Responses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Give addAll a working resource, to show the whole shebang fails 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-add.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-add.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-add.js
index c3fa2d0d1e4446a9cdf1e8e0af265aceca095cb7..c3039b13deab2dc01b8b7b831fd4f9440cc9c25d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-add.js
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-add.js
@@ -103,6 +103,23 @@ cache_test(function(cache, test) {
return promise_rejects(
test,
new TypeError(),
+ cache.add('../resources/fetch-status.php?status=206'),
+ 'Cache.add should reject on partial response');
+ }, 'Cache.add with request that results in a status of 206');
+
+cache_test(function(cache, test) {
+ return promise_rejects(
+ test,
+ new TypeError(),
+ cache.addAll(['../resources/simple.txt',
+ '../resources/fetch-status.php?status=206']),
+ 'Cache.addAll should reject on partial response');
+ }, 'Cache.addAll with request that results in a status of 206');
+
+cache_test(function(cache, test) {
+ return promise_rejects(
+ test,
+ new TypeError(),
cache.addAll(),
'Cache.addAll with no arguments should throw TypeError.');
}, 'Cache.addAll with no arguments');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698