mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,16 @@
|
|||
// META: script=../resources/utils.js
|
||||
|
||||
function basicAuth(desc, user, pass, mode, status) {
|
||||
promise_test(function(test) {
|
||||
var headers = { "Authorization": "Basic " + btoa(user + ":" + pass)};
|
||||
var requestInit = {"credentials": mode, "headers": headers};
|
||||
return fetch(RESOURCES_DIR + "authentication.py?realm=test", requestInit).then(function(resp) {
|
||||
assert_equals(resp.status, status, "HTTP status is " + status);
|
||||
assert_equals(resp.type , "basic", "Response's type is basic");
|
||||
});
|
||||
}, desc);
|
||||
}
|
||||
|
||||
basicAuth("User-added Authorization header with include mode", "user", "password", "include", 200);
|
||||
basicAuth("User-added Authorization header with same-origin mode", "user", "password", "same-origin", 200);
|
||||
basicAuth("User-added Authorization header with omit mode", "user", "password", "omit", 200);
|
Loading…
Add table
Add a link
Reference in a new issue