mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee
This commit is contained in:
parent
fe1a057bd1
commit
24183668c4
1960 changed files with 29853 additions and 10555 deletions
|
@ -0,0 +1 @@
|
|||
See `/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html` for more detailed parsing tests (shared with `<meta http-equiv=refresh>`).
|
|
@ -0,0 +1,23 @@
|
|||
async_test(t => {
|
||||
const frame = document.createElement("iframe");
|
||||
frame.src = "resources/refresh.py"
|
||||
frame.onload = t.step_func(() => {
|
||||
// Could be better by verifying that resources/refresh.py loads too
|
||||
if(frame.contentWindow.location.href === (new URL("resources/refreshed.txt?\u0080\u00FF", self.location)).href) { // Make sure bytes got mapped to code points of the same value
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
document.body.appendChild(frame)
|
||||
}, "When navigating the Refresh header needs to be followed");
|
||||
|
||||
async_test(t => {
|
||||
const frame = document.createElement("iframe");
|
||||
frame.src = "resources/multiple.asis"
|
||||
frame.onload = t.step_func(() => {
|
||||
// Could be better by verifying that resources/refresh.py loads too
|
||||
if(frame.contentWindow.location.href === (new URL("resources/refreshed.txt", self.location)).href) {
|
||||
t.done();
|
||||
}
|
||||
});
|
||||
document.body.appendChild(frame)
|
||||
}, "When there's both a Refresh header and <meta> the Refresh header wins")
|
|
@ -0,0 +1,6 @@
|
|||
HTTP/1.1 200 OK
|
||||
Refresh: 0,./refreshed.txt
|
||||
Content-Type:text/html
|
||||
|
||||
I don't understand.
|
||||
<meta http-equiv=refresh content=1;./>
|
|
@ -0,0 +1,4 @@
|
|||
def main(request, response):
|
||||
response.headers.set("Content-Type", "text/plain")
|
||||
response.headers.set("Refresh", "0;./refreshed.txt?\x80\xFF") # Test byte to Unicode conversion
|
||||
response.content = "Not refreshed.\n"
|
|
@ -0,0 +1 @@
|
|||
Have another.
|
|
@ -0,0 +1,6 @@
|
|||
promise_test(() => {
|
||||
return fetch("resources/refresh.py").then(response => {
|
||||
assert_equals(response.headers.get("refresh"), "0;./refreshed.txt?\u0080\u00FF"); // Make sure bytes got mapped to code points of the same value
|
||||
assert_equals(response.url, (new URL("resources/refresh.py", self.location)).href);
|
||||
});
|
||||
}, "Refresh does not affect subresources.");
|
Loading…
Add table
Add a link
Reference in a new issue