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

Unified Diff: LayoutTests/http/tests/fetch/script-tests/request.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 | « no previous file | LayoutTests/http/tests/fetch/script-tests/response.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/fetch/script-tests/request.js
diff --git a/LayoutTests/http/tests/fetch/script-tests/request.js b/LayoutTests/http/tests/fetch/script-tests/request.js
index 7e16329c30e3999b4f9d8d6f590641ff4e42c23e..ed52f68729d03e4fef976fd0353b8694f3f9a80d 100644
--- a/LayoutTests/http/tests/fetch/script-tests/request.js
+++ b/LayoutTests/http/tests/fetch/script-tests/request.js
@@ -482,6 +482,9 @@ promise_test(function() {
}).then(function(texts) {
assert_equals(texts[0], '', 'The body is consumed.');
assert_equals(texts[1], '', 'The body is consumed.');
+ return req.clone().text();
+ }).then(function(text) {
+ assert_equals(text, '', 'The body was consumed before cloned.');
});
}, 'Test clone behavior with loading content from Request.');
« no previous file with comments | « no previous file | LayoutTests/http/tests/fetch/script-tests/response.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698