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

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

Issue 1862293003: Fetch: Fix 'body' processing in RequestInit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
index af33bce4cc61156593d57161c97e7197ed9be4c8..2295db08e135922c42f533e3bddf531bb557a85c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js
@@ -748,4 +748,16 @@ promise_test(function(t) {
});
}, 'Extract a MIME type (1)');
+promise_test(function(t) {
+ var req = new Request('http://localhost/',
+ {method: 'POST',
+ credentials: 'include',
+ body: 'this is a body'});
+
+ return req.text()
+ .then(t => {
+ assert_equals(t, 'this is a body');
+ });
+ }, 'Credentials and body can both be set.');
+
done();

Powered by Google App Engine
This is Rietveld 408576698