Bug 1680134 [wpt PR 26708] - [blinkpy] Switch to run WPT subcommands using Python3, a=testonly

Automatic update from web-platform-tests
[blinkpy] Switch to run WPT subcommands using Python3

Upstream WPT is now Python 3-first. To minimize the likelihood of
Chromium engineers writing incompatible tests*, we should run the WPT
parts of blinkpy under Python 3.

* Or, more likely, incompatible Python file handlers
(https://web-platform-tests.org/writing-tests/python-handlers/index.html)

Bug: 1135554
Change-Id: I9813a81543219ede80bb58de971d2e4509ef4b53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2558741
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835668}

--

wpt-commits: 23ceb31dfac60ca258be05c2cf9a51ba90d0d15a
wpt-pr: 26708
This commit is contained in:
moz-wptsync-bot 2020-12-15 18:19:21 +00:00
Родитель 2d6db35fd7
Коммит 84a7b82270
4 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -35,6 +35,6 @@ def main(request, response):
if len(matches) != 1:
return 404, [], '{} origin policies found at a path matching "{}"'.format(len(matches), filepath_pattern)
with open(matches[0]) as f:
with open(matches[0], 'rb') as f:
data = f.read()
return return_code, [('Content-Type', content_type)], data

Просмотреть файл

@ -21,7 +21,7 @@ def main(request, response):
try:
if b'drop' in request.GET:
cookie = request.GET[b'drop']
cookie += b"; max-age=0"
cookie += b'; max-age=0'
if b'set' in request.GET:
cookie = request.GET[b'set']

Просмотреть файл

@ -9,6 +9,10 @@ def main(request, response):
]
key = request.GET.first(b"key", None)
# We serialize the key into JSON, so have to decode it first.
if key is not None:
key = key.decode('utf-8')
body = u"""
<!DOCTYPE html>
<script src="/portals/resources/stash-utils.sub.js"></script>

Просмотреть файл

@ -10,6 +10,6 @@ def main(request, response):
response.headers.set(b'WWW-Authenticate', b'Basic realm="test"')
content = b'User name/password wrong or not given: '
content += b"%s\n%s" % (request.auth.username,
request.auth.password)
content += b"%s\n%s" % (request.auth.username or b'',
request.auth.password or b'')
return content