mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Update web-platform-tests to revision 5084587f6b05bf99ad09e7844be66dcc61070cdf
This commit is contained in:
parent
6d42d2f1e8
commit
7d1071a6a4
408 changed files with 8968 additions and 2608 deletions
|
@ -1,23 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>General fetch abort tests in a service worker</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(async function() {
|
||||
const scope = 'does/not/exist';
|
||||
|
||||
let reg = await navigator.serviceWorker.getRegistration(scope);
|
||||
if (reg) await reg.unregister();
|
||||
|
||||
reg = await navigator.serviceWorker.register('general.any.worker.js', {scope});
|
||||
|
||||
fetch_tests_from_worker(reg.installing);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,14 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>General fetch abort tests - shared worker</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
fetch_tests_from_worker(new SharedWorker("general.any.worker.js"));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,4 @@
|
|||
// META: global=window,worker
|
||||
// META: script=/common/utils.js
|
||||
// META: script=../request/request-error.js
|
||||
|
||||
|
|
|
@ -14,16 +14,24 @@
|
|||
var url = "http://test.url:1234/";
|
||||
test(function() {
|
||||
redirectResponse = Response.redirect(url);
|
||||
assert_equals(redirectResponse.type, "default");
|
||||
assert_false(redirectResponse.redirected);
|
||||
assert_false(redirectResponse.ok);
|
||||
assert_equals(redirectResponse.status, 302, "Default redirect status is 302");
|
||||
assert_equals(redirectResponse.headers.get("Location"), url,
|
||||
"redirected response has Location header with the correct url");
|
||||
assert_equals(redirectResponse.statusText, "");
|
||||
}, "Check default redirect response");
|
||||
|
||||
var redirectStatus = [301, 302, 303, 307, 308];
|
||||
redirectStatus.forEach(function(status) {
|
||||
[301, 302, 303, 307, 308].forEach(function(status) {
|
||||
test(function() {
|
||||
redirectResponse = Response.redirect(url, status);
|
||||
assert_equals(redirectResponse.type, "default");
|
||||
assert_false(redirectResponse.redirected);
|
||||
assert_false(redirectResponse.ok);
|
||||
assert_equals(redirectResponse.status, status, "Redirect status is " + status);
|
||||
assert_equals(redirectResponse.headers.get("Location"), url);
|
||||
assert_equals(redirectResponse.statusText, "");
|
||||
}, "Check response returned by static method redirect(), status = " + status);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue