Update web-platform-tests to revision 84e71a84b79199bc307866bbe0edcbcc7c4752ce

This commit is contained in:
WPT Sync Bot 2020-06-17 08:21:00 +00:00
parent 6d9b2eef29
commit ea69dac266
93 changed files with 1056 additions and 202 deletions

View file

@ -1,10 +1,10 @@
from time import sleep
def main(request, response):
if "delay" in request.GET:
delay = int(request.GET["delay"])
if b"delay" in request.GET:
delay = int(request.GET[b"delay"])
sleep(delay)
if "stylesNotMatchingEnvironment" in request.GET:
return 'h1 {color: brown;}'
if b"stylesNotMatchingEnvironment" in request.GET:
return u'h1 {color: brown;}'
else:
return 'h1 {color: purple;}'
return u'h1 {color: purple;}'

View file

@ -1,7 +1,7 @@
def main(request, response):
response.add_required_headers = False
if "content_type" in request.GET:
response.writer.write_header("Content-Type", request.GET.first("content_type"))
if "nosniff" in request.GET:
response.writer.write_header("x-content-type-options", "nosniff")
response.writer.write_content("body { background:red }")
if b"content_type" in request.GET:
response.writer.write_header(b"Content-Type", request.GET.first(b"content_type"))
if b"nosniff" in request.GET:
response.writer.write_header(b"x-content-type-options", b"nosniff")
response.writer.write_content(u"body { background:red }")

View file

@ -1,9 +1,9 @@
def main(request, response):
try:
count = int(request.server.stash.take(request.GET["id"]))
count = int(request.server.stash.take(request.GET[b"id"]))
except:
count = 0
if "count" in request.GET:
if b"count" in request.GET:
return str(count)
request.server.stash.put(request.GET["id"], str(count + 1))
return 'body { color: red }'
request.server.stash.put(request.GET[b"id"], str(count + 1))
return u'body { color: red }'

View file

@ -1,4 +1,4 @@
def main(request, response):
response.headers.set("Content-Type", "text/html")
response.headers.set("Refresh", request.GET.first("input"))
response.content = "<!doctype html>refresh.py\n"
response.headers.set(b"Content-Type", b"text/html")
response.headers.set(b"Refresh", request.GET.first(b"input"))
response.content = u"<!doctype html>refresh.py\n"