mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision b'7af9d6ec48ab04043a2bea85a3599904a1a19efa'
This commit is contained in:
parent
8050c95e31
commit
87be1008de
2742 changed files with 142451 additions and 40667 deletions
|
@ -1,11 +1,10 @@
|
|||
// META: global=window,worker
|
||||
// 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) {
|
||||
return fetch("../resources/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");
|
||||
});
|
||||
|
@ -15,3 +14,4 @@ function basicAuth(desc, user, pass, mode, status) {
|
|||
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);
|
||||
basicAuth("User-added bogus Authorization header with omit mode", "notuser", "notpassword", "omit", 401);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue