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

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

Issue 1049983003: [Fetch] Body consume function should not set bodyUsed flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@stream-clone
Patch Set: Created 5 years, 9 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: LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
diff --git a/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
index cc8c7c9e128c95eb4cae0e21a13a1bcce4e2e1e3..60c1152fcc81a2ce5df38590426d66931aa1a8d0 100644
--- a/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
+++ b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js
@@ -312,15 +312,12 @@ cache_test(function(cache) {
assert_false(response.bodyUsed,
'[https://fetch.spec.whatwg.org/#dom-body-bodyused] ' +
'Response.bodyUsed should be initially false.');
- response.text().then(function() {
- assert_true(
+ return response.text().then(function() {
+ assert_false(
response.bodyUsed,
'[https://fetch.spec.whatwg.org/#concept-body-consume-body] ' +
- 'The text() method should consume the body of the response.');
- return assert_promise_rejects(
- cache.put(new Request(test_url), response),
- new TypeError(),
- 'Cache.put should throw a TypeError for a response with used body.');
+ 'The text() method should not set "body passed" flag.');
+ return cache.put(new Request(test_url), response);
});
}, 'Cache.put with a used response body');
« no previous file with comments | « LayoutTests/http/tests/cachestorage/script-tests/cache-add.js ('k') | LayoutTests/http/tests/fetch/script-tests/request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698