Update web-platform-tests to revision bda2059150dca8ab47f088b4cc619fcdc1f262fa

This commit is contained in:
Ms2ger 2016-05-30 09:58:25 +02:00
parent 3535f3f6c2
commit 7c4281f3da
182 changed files with 7692 additions and 1042 deletions

View file

@ -41,7 +41,7 @@ for (var statusCode of [301, 302, 303, 307, 308]) {
redirectLocation("Redirect " + statusCode + " in \"manual\" mode without location", redirUrl, undefined, statusCode, "manual", true);
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "follow", false);
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "manual", false);
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with invalid location", redirUrl, invalidLocationUrl, statusCode, "manual", true);
redirectLocation("Redirect " + statusCode + " in \"follow\" mode with data location", redirUrl, dataLocationUrl, statusCode, "follow", false);
redirectLocation("Redirect " + statusCode + " in \"manual\" mode with data location", redirUrl, dataLocationUrl, statusCode, "manual", true);

View file

@ -17,6 +17,7 @@ function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, met
assert_equals(resp.status, 200, "Response's status is 200");
assert_equals(resp.type, "basic", "Response's type basic");
assert_equals(resp.headers.get("x-request-method"), expectedMethod, "Request method after redirection is " + expectedMethod);
assert_true(resp.redirected);
return resp.text().then(function(text) {
assert_equals(text, expectedMethod == "POST" ? requestInit.body : "");
});
@ -24,6 +25,14 @@ function redirectMethod(desc, redirectUrl, redirectLocation, redirectStatus, met
}, desc);
}
promise_test(function(test) {
assert_false(new Response().redirected);
return fetch(RESOURCES_DIR + "method.py").then(function(resp) {
assert_equals(resp.status, 200, "Response's status is 200");
assert_false(resp.redirected);
});
}, "Response.redirected should be false on not-redirected responses");
var redirUrl = RESOURCES_DIR + "redirect.py";
var locationUrl = "method.py";