Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -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);