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

Unified Diff: LayoutTests/http/tests/fetch/script-tests/response.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/fetch/script-tests/response.js
diff --git a/LayoutTests/http/tests/fetch/script-tests/response.js b/LayoutTests/http/tests/fetch/script-tests/response.js
index 4fb92e8ec156af137b104f5fa6300decd9bafe02..b3fc72ef8f75f7960a894cb64fa57cbd5a80decb 100644
--- a/LayoutTests/http/tests/fetch/script-tests/response.js
+++ b/LayoutTests/http/tests/fetch/script-tests/response.js
@@ -493,4 +493,19 @@ promise_test(function(t) {
});
}, 'Extract a MIME type (3)');
+promise_test(function(t) {
+ var res = new Response('hello');
+ return res.text().then(function(text) {
+ assert_equals(text, 'hello');
+ return Promise.all([res.text(), res.text()]);
+ }).then(function(texts) {
+ assert_equals(texts[0], '');
+ assert_equals(texts[1], '');
+ return res.body.getReader().read();
+ }).then(function(r) {
+ assert_true(r.done);
+ assert_equals(r.value, undefined);
+ });
+ }, 'Read after text()');
+
done();
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/request.js ('k') | LayoutTests/http/tests/fetch/script-tests/response-content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698