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

Unified Diff: LayoutTests/http/tests/fetch/script-tests/response.js

Issue 1056813002: [Fetch] Request.clone() should reflect body consumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@body-used
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
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/request.js ('k') | Source/modules/fetch/Request.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b3fc72ef8f75f7960a894cb64fa57cbd5a80decb..5ba901a5ad0e0f8abc69ad0df26a80ffa37551d9 100644
--- a/LayoutTests/http/tests/fetch/script-tests/response.js
+++ b/LayoutTests/http/tests/fetch/script-tests/response.js
@@ -355,6 +355,11 @@ promise_test(function(t) {
return Promise.all([res.text(), clone.text()]).then(function(r) {
assert_equals(r[0], 'hello');
assert_equals(r[1], 'hello');
+ return Promise.all([res.text(), clone.text(), res.clone().text()]);
+ }).then(function(r) {
+ assert_equals(r[0], '');
+ assert_equals(r[1], '');
+ assert_equals(r[2], '');
});
}, 'Clone on Response (text)');
@@ -371,6 +376,11 @@ promise_test(function(t) {
return Promise.all([consume(reader1), consume(reader2)]).then(function(r) {
assert_equals(decode(r[0]), 'hello');
assert_equals(decode(r[1]), 'hello');
+ return Promise.all([res.text(), clone.text(), res.clone().text()]);
+ }).then(function(r) {
+ assert_equals(r[0], '');
+ assert_equals(r[1], '');
+ assert_equals(r[2], '');
});
}, 'Clone on Response (manual read)');
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/request.js ('k') | Source/modules/fetch/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698