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

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

Issue 1485283002: Sync Cache API tests w/ web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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-put.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
index 4d045c45366ae76d943d52c9d241d30a797427b3..b452e453440253278fddd575312953683009ef80 100644
--- a/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
+++ b/third_party/WebKit/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
@@ -302,4 +302,22 @@ cache_test(function(cache) {
});
}, 'getReader() after Cache.put');
+cache_test(function(cache) {
+ return assert_promise_rejects(
+ cache.put(new Request(test_url),
+ new Response(test_body, { headers: { VARY: '*' }})),
+ new TypeError(),
+ 'Cache.put should reject VARY:* Responses with a TypeError.');
+ }, 'Cache.put with a VARY:* Response');
+
+cache_test(function(cache) {
+ return assert_promise_rejects(
+ cache.put(new Request(test_url),
+ new Response(test_body,
+ { headers: { VARY: 'Accept-Language,*' }})),
+ new TypeError(),
+ 'Cache.put should reject Responses with an embedded VARY:* with a ' +
+ 'TypeError.');
+ }, 'Cache.put with an embedded VARY:* Response');
+
done();

Powered by Google App Engine
This is Rietveld 408576698