Update web-platform-tests to revision 5c34fc630374b9eb0559139a486ff1a2e4247c4f

This commit is contained in:
WPT Sync Bot 2020-05-28 08:18:22 +00:00
parent b0f0bd8282
commit 1b463fce85
222 changed files with 5045 additions and 641 deletions

View file

@ -1,51 +1,50 @@
from wptserve.handlers import HTTPException
import urllib
def main(request, response):
if request.method != "GET":
raise HTTPException(400, message="Method was not GET")
if request.method != u"GET":
raise HTTPException(400, message=u"Method was not GET")
if not "id" in request.GET:
raise HTTPException(400, message="No id")
if not b"id" in request.GET:
raise HTTPException(400, message=u"No id")
id = request.GET['id']
if "read" in request.GET:
id = request.GET[b'id']
if b"read" in request.GET:
data = request.server.stash.take(id)
if data is None:
response.set_error(404, "Tried to read data not yet set")
response.set_error(404, u"Tried to read data not yet set")
return
return [("Content-Type", "text/plain")], data
return [(b"Content-Type", b"text/plain")], data
elif "cleanup" in request.GET:
elif b"cleanup" in request.GET:
request.server.stash.take(id)
return "OK"
return b"OK"
elif "delete-cookie" in request.GET:
elif b"delete-cookie" in request.GET:
response.delete_cookie(id)
return [("Content-Type", "text/plain")], "OK"
return [(b"Content-Type", b"text/plain")], b"OK"
if "origin" in request.GET:
response.headers.set('Access-Control-Allow-Origin', request.GET['origin'])
response.headers.set('Access-Control-Allow-Credentials', 'true')
if b"origin" in request.GET:
response.headers.set(b'Access-Control-Allow-Origin', request.GET[b'origin'])
response.headers.set(b'Access-Control-Allow-Credentials', b'true')
cors = request.headers.get("origin", "no")
cors = request.headers.get(b"origin", b"no")
cookie = request.cookies.first(id, None)
cookie_value = cookie.value if cookie is not None else "no"
line = 'cors = ' + cors + ' | cookie = ' + cookie_value;
cookie_value = cookie.value if cookie is not None else b"no"
line = b'cors = ' + cors + b' | cookie = ' + cookie_value
data = request.server.stash.take(id)
if data is not None:
line = data + "\n" + line
line = data + b"\n" + line
request.server.stash.put(id, line)
if "redirect" in request.GET:
if b"redirect" in request.GET:
response.status = 302
response.headers.set('Location', request.GET['redirect'])
response.headers.set(b'Location', request.GET[b'redirect'])
else:
return """WEBVTT
return b"""WEBVTT
00:00:00.000 --> 00:00:10.000
Test"""

View file

@ -1,3 +1,3 @@
import base64
def main(req, res):
return 404, [('Content-Type', 'image/png')], base64.decodestring("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=")
return 404, [(b'Content-Type', b'image/png')], base64.decodestring(b"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMGjBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=")

View file

@ -0,0 +1,11 @@
<title>HTMLObjectElement: construct in a document with a null browsing context</title>
<link rel="author" title="Nate Chapin" href="mailto:japhet@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/C/#the-object-element">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1083437">
<meta name="assert" content="Constructing an HTMLObjectElement in a document with a null browsing context should not crash"/>
<iframe id="i"></iframe>
<script>
var doc = i.contentDocument;
i.remove();
doc.createElement('object');
</script>