Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee

This commit is contained in:
WPT Sync Bot 2018-05-18 22:02:29 -04:00
parent fe1a057bd1
commit 24183668c4
1960 changed files with 29853 additions and 10555 deletions

View file

@ -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>`).

View file

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

View file

@ -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;./>

View file

@ -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"

View file

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