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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html

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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
index 7622777cb22bc17419105a601acd8018002a32a3..5fe86f908e0702c5dcb683888fe8202b690421dc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
@@ -12,6 +12,16 @@ var c = new PasswordCredential({
});
promise_test(_ => {
+ var r = new Request('/', { credentials: c, body: 'this is a body', method: 'POST' });
+ return r.text().then(t => assert_equals(t, ""));
+}, "Body ignored in presence of a PasswordCredential");
+
+promise_test(_ => {
+ var r = new Request('/', { credentials: 'include', body: 'this is a body', method: 'POST' });
+ return r.text().then(t => assert_equals(t, "this is a body"));
+}, "Body present if 'credentials' is not a PasswordCredential");
+
+promise_test(_ => {
var r = new Request('/', { credentials: c, method: 'POST' });
var clone = r.clone();
assert_equals(r.credentials, "password");
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/request.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698