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(); |