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

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

Issue 1053503002: [Fetch] Response.clone should tee the body stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 68931272955f23b5d79df66538468375d8b5fb22..1a913871797d3c227f9bc910ce419bbdc4b74a36 100644
--- a/LayoutTests/http/tests/fetch/script-tests/request.js
+++ b/LayoutTests/http/tests/fetch/script-tests/request.js
@@ -668,11 +668,13 @@ promise_test(function(t) {
{method: 'POST',
body: new Blob([''], {type: 'Text/Plain'}),
headers: [['Content-Type', 'Text/Html']]});
- req = req.clone();
- return req.blob()
- .then(function(blob) {
- assert_equals(blob.type, 'text/html');
+ var clone = req.clone();
+ return Promise.all([req.blob(), clone.blob()])
+ .then(function(blobs) {
+ assert_equals(blobs[0].type, 'text/html');
+ assert_equals(blobs[1].type, 'text/html');
assert_equals(req.headers.get('Content-Type'), 'Text/Html');
+ assert_equals(clone.headers.get('Content-Type'), 'Text/Html');
});
}, 'Extract a MIME type with clone');
« 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