Commit 4fec1897 authored by mkwst's avatar mkwst Committed by Commit bot

Fix a 'promise_test' bug in 'http/tests/credentialmanager/passwordcredential-fetch.html'.

BUG=662172

Review-Url: https://codereview.chromium.org/2482443002
Cr-Commit-Position: refs/heads/master@{#430243}
parent ff6af066
This is a testharness.js-based test.
PASS Body ignored in presence of a PasswordCredential
PASS Body present if 'credentials' is not a PasswordCredential
PASS Creating/cloning a 'Request' does not expose the credential.
FAIL Creating a 'Request' throws in various ways. assert_not_equals: got disallowed value undefined
PASS Simple Fetch
PASS Simple Fetch
PASS Fetch with cloned Request
PASS Fetch with copied Request
PASS Fetch with overridden 'credentials'
PASS 'idName' and 'passwordName'
PASS 'additionalData': Empty FormData has no effect.
PASS 'additionalData': FormData properties are properly injected.
PASS 'additionalData': FormData properties are properly injected after assignment.
PASS 'additionalData': FormData properties are properly overridden.
PASS 'additionalData': Empty URLSearchParams has no effect.
PASS 'additionalData': URLSearchParams properties are properly injected.
PASS 'additionalData': URLSearchParams properties are properly overridden.
PASS 'additionalData': URLSearchParams properties are properly injected (ordering matters).
PASS fetch() after get()
PASS fetch() after get() with additionalData
PASS fetch() after get() with additionalData from DOM
Harness: the test ran to completion.
...@@ -39,7 +39,7 @@ promise_test(_ => { ...@@ -39,7 +39,7 @@ promise_test(_ => {
]); ]);
}, "Creating/cloning a 'Request' does not expose the credential."); }, "Creating/cloning a 'Request' does not expose the credential.");
promise_test(_ => { test(_ => {
assert_throws(new TypeError(), _ => new Request("https://cross-origin.example.test/", { credentials: c, method: 'POST' })); assert_throws(new TypeError(), _ => new Request("https://cross-origin.example.test/", { credentials: c, method: 'POST' }));
assert_throws(new TypeError(), _ => new Request("/", { credentials: c, method: 'GET' })); assert_throws(new TypeError(), _ => new Request("/", { credentials: c, method: 'GET' }));
assert_throws(new TypeError(), _ => new Request("/", { credentials: c, method: 'HEAD' })); assert_throws(new TypeError(), _ => new Request("/", { credentials: c, method: 'HEAD' }));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment