diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini new file mode 100644 index 00000000000..a9005e45d6e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-charset.window.js.ini @@ -0,0 +1,8 @@ +[url-charset.window.html] + expected: TIMEOUT + [Blob charset should override any auto-detected charset.] + expected: TIMEOUT + + [Blob charset should override .] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini new file mode 100644 index 00000000000..f29da48a2a0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-003.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini deleted file mode 100644 index baa9f1a7541..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/variations/font-weight-matching.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/variations/font-weight-matching.html.ini new file mode 100644 index 00000000000..75f98e27a8c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/variations/font-weight-matching.html.ini @@ -0,0 +1,37 @@ +[font-weight-matching.html] + [Test @font-face matching for weight 99] + expected: FAIL + + [Test @font-face matching for weight 420] + expected: FAIL + + [Test @font-face matching for weight 600] + expected: FAIL + + [Test @font-face matching for weight 1000] + expected: FAIL + + [Test @font-face matching for weight 470] + expected: FAIL + + [Test @font-face matching for weight 900] + expected: FAIL + + [Test @font-face matching for weight 100] + expected: FAIL + + [Test @font-face matching for weight 400] + expected: FAIL + + [Test @font-face matching for weight 249] + expected: FAIL + + [Test @font-face matching for weight 750] + expected: FAIL + + [Test @font-face matching for weight 751] + expected: FAIL + + [Test @font-face matching for weight 399] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 26d9a6ee392..9dc4e4c7787 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -315,9 +315,6 @@ [ + + diff --git a/tests/wpt/web-platform-tests/fetch/redirect-navigate/resources/destination.html b/tests/wpt/web-platform-tests/fetch/redirect-navigate/resources/destination.html new file mode 100644 index 00000000000..f98c5a8cd77 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/redirect-navigate/resources/destination.html @@ -0,0 +1,28 @@ + + + + + + + + +

Target

+

Target

+ + diff --git a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-css.py b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-css.py index a6ae546d065..b87668373ac 100644 --- a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-css.py +++ b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-css.py @@ -1,7 +1,7 @@ def main(request, response): - token = request.GET.first("token", None) - is_query = request.GET.first("query", None) != None + token = request.GET.first(b"token", None) + is_query = request.GET.first(b"query", None) != None with request.server.stash.lock: value = request.server.stash.take(token) count = 0 @@ -14,15 +14,15 @@ def main(request, response): count = count + 1 request.server.stash.put(token, count) if is_query: - headers = [("Count", count)] - content = "" + headers = [(b"Count", count)] + content = b"" return 200, headers, content else: - content = "body { background: rgb(0, 128, 0); }" + content = b"body { background: rgb(0, 128, 0); }" if count > 1: - content = "body { background: rgb(255, 0, 0); }" + content = b"body { background: rgb(255, 0, 0); }" - headers = [("Content-Type", "text/css"), - ("Cache-Control", "private, max-age=0, stale-while-revalidate=60")] + headers = [(b"Content-Type", b"text/css"), + (b"Cache-Control", b"private, max-age=0, stale-while-revalidate=60")] return 200, headers, content diff --git a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-image.py b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-image.py index 839eb84bb34..36e6fc0c9bb 100644 --- a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-image.py +++ b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-image.py @@ -1,9 +1,11 @@ import os.path +from wptserve.utils import isomorphic_decode + def main(request, response): - token = request.GET.first("token", None) - is_query = request.GET.first("query", None) != None + token = request.GET.first(b"token", None) + is_query = request.GET.first(b"query", None) != None with request.server.stash.lock: value = request.server.stash.take(token) count = 0 @@ -17,22 +19,22 @@ def main(request, response): request.server.stash.put(token, count) if is_query: - headers = [("Count", count)] - content = "" + headers = [(b"Count", count)] + content = b"" return 200, headers, content else: - filename = "green-16x16.png" + filename = u"green-16x16.png" if count > 1: - filename = "green-256x256.png" + filename = u"green-256x256.png" - path = os.path.join(os.path.dirname(__file__), "../../../images", filename) + path = os.path.join(os.path.dirname(isomorphic_decode(__file__)), u"../../../images", filename) body = open(path, "rb").read() response.add_required_headers = False response.writer.write_status(200) - response.writer.write_header("content-length", len(body)) - response.writer.write_header("Cache-Control", "private, max-age=0, stale-while-revalidate=60") - response.writer.write_header("content-type", "image/png") + response.writer.write_header(b"content-length", len(body)) + response.writer.write_header(b"Cache-Control", b"private, max-age=0, stale-while-revalidate=60") + response.writer.write_header(b"content-type", b"image/png") response.writer.end_headers() response.writer.write(body) diff --git a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-script.py b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-script.py index 8ad54671f42..731cd805654 100644 --- a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-script.py +++ b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/resources/stale-script.py @@ -1,12 +1,12 @@ -import random, string, datetime +import random, string def id_token(): letters = string.ascii_lowercase - return ''.join(random.choice(letters) for i in range(20)) + return b''.join(random.choice(letters).encode("utf-8") for i in range(20)) def main(request, response): - token = request.GET.first("token", None) - is_query = request.GET.first("query", None) != None + token = request.GET.first(b"token", None) + is_query = request.GET.first(b"query", None) != None with request.server.stash.lock: value = request.server.stash.take(token) count = 0 @@ -20,13 +20,13 @@ def main(request, response): request.server.stash.put(token, count) if is_query: - headers = [("Count", count)] - content = "" + headers = [(b"Count", count)] + content = u"" return 200, headers, content else: unique_id = id_token() - headers = [("Content-Type", "text/javascript"), - ("Cache-Control", "private, max-age=0, stale-while-revalidate=60"), - ("Unique-Id", unique_id)] - content = "report('{}')".format(unique_id) + headers = [(b"Content-Type", b"text/javascript"), + (b"Cache-Control", b"private, max-age=0, stale-while-revalidate=60"), + (b"Unique-Id", unique_id)] + content = b"report('%s')" % unique_id return 200, headers, content diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-non-utf8-encoded-document.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-non-utf8-encoded-document.html new file mode 100644 index 00000000000..7d4e994f0a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-non-utf8-encoded-document.html @@ -0,0 +1,21 @@ + +Fragment Navigation: fragment id should not be found in non UTF8 document + + + + + +
+
+
+ diff --git a/tests/wpt/web-platform-tests/interfaces/webxr-ar-module.idl b/tests/wpt/web-platform-tests/interfaces/webxr-ar-module.idl index 2a525d2da89..097469d400d 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr-ar-module.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr-ar-module.idl @@ -23,3 +23,7 @@ partial interface XRSession { // Attributes readonly attribute XRInteractionMode interactionMode; }; + +partial interface XRView { + readonly attribute boolean isFirstPersonObserver; +}; diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-ping-frame.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-ping-frame.py index bb07c241ad4..30fbbbb5357 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-ping-frame.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-ping-frame.py @@ -1,11 +1,11 @@ def main(request, response): - if 'nested' in request.GET: + if b'nested' in request.GET: return ( - [('Content-Type', 'text/html')], - 'failed: nested frame was not intercepted by the service worker' + [(b'Content-Type', b'text/html')], + b'failed: nested frame was not intercepted by the service worker' ) - return ([('Content-Type', 'text/html')], """ + return ([(b'Content-Type', b'text/html')], b""" diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-popup-frame.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-popup-frame.py index f0b8cd578e3..04c12a6037d 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-popup-frame.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/about-blank-replacement-popup-frame.py @@ -1,11 +1,11 @@ def main(request, response): - if 'nested' in request.GET: + if b'nested' in request.GET: return ( - [('Content-Type', 'text/html')], - 'failed: nested frame was not intercepted by the service worker' + [(b'Content-Type', b'text/html')], + b'failed: nested frame was not intercepted by the service worker' ) - return ([('Content-Type', 'text/html')], """ + return ([(b'Content-Type', b'text/html')], b""" diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py index 04f544b9b1b..47e0a1179cc 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py @@ -1,18 +1,18 @@ import time def main(request, response): - headers = [('Content-Type', 'application/javascript'), - ('Cache-Control', 'max-age=0')] + headers = [(b'Content-Type', b'application/javascript'), + (b'Cache-Control', b'max-age=0')] - imported_content_type = '' - if 'imported' in request.GET: - imported_content_type = request.GET['imported'] + imported_content_type = b'' + if b'imported' in request.GET: + imported_content_type = request.GET[b'imported'] - imported_content = 'default' - if imported_content_type == 'time': - imported_content = '%f' % time.time() + imported_content = b'default' + if imported_content_type == b'time': + imported_content = b'%f' % time.time() - body = ''' + body = b''' // %s ''' % (imported_content) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker.py index df8481b7d1e..dfce9e7ed46 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/bytecheck-worker.py @@ -1,30 +1,30 @@ import time def main(request, response): - headers = [('Content-Type', 'application/javascript'), - ('Cache-Control', 'max-age=0')] + headers = [(b'Content-Type', b'application/javascript'), + (b'Cache-Control', b'max-age=0')] - main_content_type = '' - if 'main' in request.GET: - main_content_type = request.GET['main'] + main_content_type = b'' + if b'main' in request.GET: + main_content_type = request.GET[b'main'] - main_content = 'default' - if main_content_type == 'time': - main_content = '%f' % time.time() + main_content = b'default' + if main_content_type == b'time': + main_content = b'%f' % time.time() - imported_request_path = '' - if 'path' in request.GET: - imported_request_path = request.GET['path'] + imported_request_path = b'' + if b'path' in request.GET: + imported_request_path = request.GET[b'path'] - imported_request_type = '' - if 'imported' in request.GET: - imported_request_type = request.GET['imported'] + imported_request_type = b'' + if b'imported' in request.GET: + imported_request_type = request.GET[b'imported'] - imported_request = '' - if imported_request_type == 'time': - imported_request = '?imported=time'; + imported_request = b'' + if imported_request_type == b'time': + imported_request = b'?imported=time' - body = ''' + body = b''' // %s importScripts('%sbytecheck-worker-imported-script.py%s'); ''' % (main_content, imported_request_path, imported_request) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-content.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-content.py index c40ef0cf2bb..70ae4b60254 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-content.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-content.py @@ -1,13 +1,15 @@ # This is a copy of fetch/api/resources/echo-content.py since it's more # convenient in this directory due to service worker's path restriction. +from wptserve.utils import isomorphic_encode + def main(request, response): - headers = [("X-Request-Method", request.method), - ("X-Request-Content-Length", request.headers.get("Content-Length", "NO")), - ("X-Request-Content-Type", request.headers.get("Content-Type", "NO")), + headers = [(b"X-Request-Method", isomorphic_encode(request.method)), + (b"X-Request-Content-Length", request.headers.get(b"Content-Length", b"NO")), + (b"X-Request-Content-Type", request.headers.get(b"Content-Type", b"NO")), # Avoid any kind of content sniffing on the response. - ("Content-Type", "text/plain")] + (b"Content-Type", b"text/plain")] content = request.body diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-cookie-worker.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-cookie-worker.py index 73e8caf7f8e..561f64a35ad 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-cookie-worker.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/echo-cookie-worker.py @@ -1,24 +1,24 @@ def main(request, response): - headers = [("Content-Type", "text/javascript")] + headers = [(b"Content-Type", b"text/javascript")] values = [] for key in request.cookies: for cookie in request.cookies.get_list(key): - values.append('"%s": "%s"' % (key, cookie.value)) + values.append(b'"%s": "%s"' % (key, cookie.value)) # Update the counter to change the script body for every request to trigger # update of the service worker. - key = request.GET['key'] + key = request.GET[b'key'] counter = request.server.stash.take(key) if counter is None: counter = 0 counter += 1 request.server.stash.put(key, counter) - body = """ + body = b""" // %d self.addEventListener('message', e => { e.source.postMessage({%s}) -});""" % (counter, ','.join(values)) +});""" % (counter, b','.join(values)) return headers, body diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py index 61b89cbd95b..a6cc9b12ad1 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py @@ -1,108 +1,109 @@ import base64 import json import os -import sys + +from wptserve.utils import isomorphic_decode, isomorphic_encode def main(request, response): headers = [] - headers.append(('X-ServiceWorker-ServerHeader', 'SetInTheServer')) + headers.append((b'X-ServiceWorker-ServerHeader', b'SetInTheServer')) - if "ACAOrigin" in request.GET: - for item in request.GET["ACAOrigin"].split(","): - headers.append(("Access-Control-Allow-Origin", item)) + if b"ACAOrigin" in request.GET: + for item in request.GET[b"ACAOrigin"].split(b","): + headers.append((b"Access-Control-Allow-Origin", item)) - for suffix in ["Headers", "Methods", "Credentials"]: - query = "ACA%s" % suffix - header = "Access-Control-Allow-%s" % suffix + for suffix in [b"Headers", b"Methods", b"Credentials"]: + query = b"ACA%s" % suffix + header = b"Access-Control-Allow-%s" % suffix if query in request.GET: headers.append((header, request.GET[query])) - if "ACEHeaders" in request.GET: - headers.append(("Access-Control-Expose-Headers", request.GET["ACEHeaders"])) + if b"ACEHeaders" in request.GET: + headers.append((b"Access-Control-Expose-Headers", request.GET[b"ACEHeaders"])) - if ("Auth" in request.GET and not request.auth.username) or "AuthFail" in request.GET: + if (b"Auth" in request.GET and not request.auth.username) or b"AuthFail" in request.GET: status = 401 - headers.append(('WWW-Authenticate', 'Basic realm="Restricted"')) - body = 'Authentication canceled' + headers.append((b'WWW-Authenticate', b'Basic realm="Restricted"')) + body = b'Authentication canceled' return status, headers, body - if "PNGIMAGE" in request.GET: - headers.append(("Content-Type", "image/png")) - body = base64.decodestring("iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1B" - "AACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMG" - "jBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=") + if b"PNGIMAGE" in request.GET: + headers.append((b"Content-Type", b"image/png")) + body = base64.decodestring(b"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1B" + b"AACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAhSURBVDhPY3wro/KfgQLABKXJBqMG" + b"jBoAAqMGDLwBDAwAEsoCTFWunmQAAAAASUVORK5CYII=") return headers, body - if "VIDEO" in request.GET: - headers.append(("Content-Type", "video/webm")) - body = open(os.path.join(request.doc_root, "media", "movie_5.ogv"), "rb").read() + if b"VIDEO" in request.GET: + headers.append((b"Content-Type", b"video/webm")) + body = open(os.path.join(request.doc_root, u"media", u"movie_5.ogv"), "rb").read() length = len(body) # If "PartialContent" is specified, the requestor wants to test range # requests. For the initial request, respond with "206 Partial Content" # and don't send the entire content. Then expect subsequent requests to # have a "Range" header with a byte range. Respond with that range. - if "PartialContent" in request.GET: + if b"PartialContent" in request.GET: if length < 1: - return 500, headers, "file is too small for range requests" + return 500, headers, b"file is too small for range requests" start = 0 end = length - 1 - if "Range" in request.headers: - range_header = request.headers["Range"] - prefix = "bytes=" - split_header = range_header[len(prefix):].split("-") + if b"Range" in request.headers: + range_header = request.headers[b"Range"] + prefix = b"bytes=" + split_header = range_header[len(prefix):].split(b"-") # The first request might be "bytes=0-". We want to force a range # request, so just return the first byte. - if split_header[0] == "0" and split_header[1] == "": + if split_header[0] == b"0" and split_header[1] == b"": end = start # Otherwise, it is a range request. Respect the values sent. - if split_header[0] != "": + if split_header[0] != b"": start = int(split_header[0]) - if split_header[1] != "": + if split_header[1] != b"": end = int(split_header[1]) else: # The request doesn't have a range. Force a range request by # returning the first byte. end = start - headers.append(("Accept-Ranges", "bytes")) - headers.append(("Content-Length", str(end -start + 1))) - headers.append(("Content-Range", "bytes %d-%d/%d" % (start, end, length))) + headers.append((b"Accept-Ranges", b"bytes")) + headers.append((b"Content-Length", isomorphic_encode(str(end -start + 1)))) + headers.append((b"Content-Range", b"bytes %d-%d/%d" % (start, end, length))) chunk = body[start:(end + 1)] return 206, headers, chunk return headers, body - username = request.auth.username if request.auth.username else "undefined" - password = request.auth.password if request.auth.username else "undefined" - cookie = request.cookies['cookie'].value if 'cookie' in request.cookies else "undefined" + username = request.auth.username if request.auth.username else b"undefined" + password = request.auth.password if request.auth.username else b"undefined" + cookie = request.cookies[b'cookie'].value if b'cookie' in request.cookies else b"undefined" files = [] - for key, values in request.POST.iteritems(): + for key, values in request.POST.items(): assert len(values) == 1 value = values[0] - if not hasattr(value, "file"): + if not hasattr(value, u"file"): continue data = value.file.read() - files.append({"key": key, - "name": value.file.name, - "type": value.type, - "error": 0, #TODO, - "size": len(data), - "content": data}) + files.append({u"key": isomorphic_decode(key), + u"name": value.file.name, + u"type": value.type, + u"error": 0, #TODO, + u"size": len(data), + u"content": data}) - get_data = {key:request.GET[key] for key,value in request.GET.iteritems()} - post_data = {key:request.POST[key] for key,value in request.POST.iteritems() - if not hasattr(request.POST[key], "file")} - headers_data = {key:request.headers[key] for key,value in request.headers.iteritems()} + get_data = {isomorphic_decode(key):isomorphic_decode(request.GET[key]) for key, value in request.GET.items()} + post_data = {isomorphic_decode(key):isomorphic_decode(request.POST[key]) for key, value in request.POST.items() + if not hasattr(request.POST[key], u"file")} + headers_data = {isomorphic_decode(key):isomorphic_decode(request.headers[key]) for key, value in request.headers.items()} - data = {"jsonpResult": "success", - "method": request.method, - "headers": headers_data, - "body": request.body, - "files": files, - "GET": get_data, - "POST": post_data, - "username": username, - "password": password, - "cookie": cookie} + data = {u"jsonpResult": u"success", + u"method": request.method, + u"headers": headers_data, + u"body": isomorphic_decode(request.body), + u"files": files, + u"GET": get_data, + u"POST": post_data, + u"username": isomorphic_decode(username), + u"password": isomorphic_decode(password), + u"cookie": isomorphic_decode(cookie)} - return headers, "report( %s )" % json.dumps(data) + return headers, u"report( %s )" % json.dumps(data) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-script.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-script.py index e6a392c863e..bf8df154a88 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-script.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-no-freshness-headers-script.py @@ -1,6 +1,6 @@ def main(request, response): headers = [] # Sets an ETag header to check the cache revalidation behavior. - headers.append(("ETag", "abc123")) - headers.append(("Content-Type", "text/javascript")) - return headers, "/* empty script */" + headers.append((b"ETag", b"abc123")) + headers.append((b"Content-Type", b"text/javascript")) + return headers, b"/* empty script */" diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-mime-type-worker.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-mime-type-worker.py index aa885e7a4de..b6e82f31d37 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-mime-type-worker.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-mime-type-worker.py @@ -1,10 +1,10 @@ def main(request, response): - if 'mime' in request.GET: + if b'mime' in request.GET: return ( - [('Content-Type', 'application/javascript')], - "importScripts('./mime-type-worker.py?mime={0}');".format(request.GET['mime']) + [(b'Content-Type', b'application/javascript')], + b"importScripts('./mime-type-worker.py?mime=%s');" % request.GET[b'mime'] ) return ( - [('Content-Type', 'application/javascript')], - "importScripts('./mime-type-worker.py');" + [(b'Content-Type', b'application/javascript')], + b"importScripts('./mime-type-worker.py');" ) diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-scripts-echo.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-scripts-echo.py index 7d92794e31b..d38d660e659 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-scripts-echo.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/import-scripts-echo.py @@ -1,6 +1,6 @@ def main(req, res): return ([ - ('Cache-Control', 'no-cache, must-revalidate'), - ('Pragma', 'no-cache'), - ('Content-Type', 'application/javascript')], - 'echo_output = "%s";\n' % req.GET['msg']) + (b'Cache-Control', b'no-cache, must-revalidate'), + (b'Pragma', b'no-cache'), + (b'Content-Type', b'application/javascript')], + b'echo_output = "%s";\n' % req.GET[b'msg']) diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/async-iterator.any.js b/tests/wpt/web-platform-tests/streams/readable-streams/async-iterator.any.js index a1acaeb6b1f..7c49fe937de 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/async-iterator.any.js +++ b/tests/wpt/web-platform-tests/streams/readable-streams/async-iterator.any.js @@ -15,10 +15,6 @@ function assert_iter_result(iterResult, value, done, message) { assert_equals(iterResult.done, done, `${prefix}done`); } -test(() => { - assert_equals(ReadableStream.prototype[Symbol.asyncIterator], ReadableStream.prototype.values); -}, '@@asyncIterator() method is === to values() method'); - test(() => { const s = new ReadableStream(); const it = s.values();