mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Update web-platform-tests to revision 0ed072539aa45d3a5a67c9164b243d27873f257c
This commit is contained in:
parent
0954871992
commit
e613cfd108
76 changed files with 1109 additions and 703 deletions
|
@ -0,0 +1,15 @@
|
|||
test(() => {
|
||||
assert_false("getAll" in new Headers());
|
||||
assert_false("getAll" in Headers.prototype);
|
||||
}, "Headers object no longer has a getAll() method");
|
||||
|
||||
test(() => {
|
||||
assert_false("type" in new Request("about:blank"));
|
||||
assert_false("type" in Request.prototype);
|
||||
}, "'type' getter should not exist on Request objects");
|
||||
|
||||
// See https://github.com/whatwg/fetch/pull/979 for the removal
|
||||
test(() => {
|
||||
assert_false("trailer" in new Response());
|
||||
assert_false("trailer" in Response.prototype);
|
||||
}, "Response object no longer has a trailer getter");
|
|
@ -1,4 +0,0 @@
|
|||
test(() => {
|
||||
assert_false("getAll" in new Headers)
|
||||
assert_false("getAll" in Headers.prototype)
|
||||
}, "Headers object no longer has a getAll() method")
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Request.type attribute should not exist</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
var request = new Request("https://domfarolino.com");
|
||||
test(() => {
|
||||
assert_equals(request.type, undefined, "request.type should be undefined");
|
||||
}, "'type' getter should not exist on Request objects");
|
||||
</script>
|
|
@ -1,24 +0,0 @@
|
|||
<!doctype html>
|
||||
<title>trailer() test</title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<div id=log></div>
|
||||
<!-- based on /xhr/getresponseheader-chunked-trailer.htm -->
|
||||
<script>
|
||||
promise_test(() => {
|
||||
return fetch("/xhr/resources/chunked.py").then(res => {
|
||||
assert_equals(res.headers.get("Trailer"), "X-Test-Me")
|
||||
assert_equals(res.headers.get("X-Test-Me"), null)
|
||||
assert_equals(res.headers.get("Content-Type"), "text/plain")
|
||||
return Promise.all([
|
||||
res.text().then(text => {
|
||||
assert_equals(text, "First chunk\r\nSecond chunk\r\nYet another (third) chunk\r\nYet another (fourth) chunk\r\n")
|
||||
}),
|
||||
res.trailer.then(trailers => {
|
||||
assert_equals(trailers.get("X-Test-Me"), "Trailer header value")
|
||||
assert_throws(new TypeError, () => trailers.append("Immutable-My-Ass", "Hi!"))
|
||||
})
|
||||
])
|
||||
})
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue