mirror of
https://github.com/servo/servo.git
synced 2025-08-17 03:15:34 +01:00
Update web-platform-tests to revision 615bb572c95add74ca4fb9fed4af5269a49cf4ef
This commit is contained in:
parent
b628b6ef8e
commit
0aa76d7524
162 changed files with 2069 additions and 636 deletions
|
@ -1,9 +1,7 @@
|
|||
[flake8]
|
||||
# flake8 config used in tools/tox.ini, tools/wpt/tox.ini, and tools/wptrunner/tox.ini
|
||||
select = E,W,F,N
|
||||
# E128: continuation line under-indented for visual indent
|
||||
# E129: visually indented line with same indent as next logical line
|
||||
# E221: multiple spaces before operator
|
||||
# E226: missing whitespace around arithmetic operator
|
||||
# E231: missing whitespace after ‘,’, ‘;’, or ‘:’
|
||||
# E251: unexpected spaces around keyword / parameter equals
|
||||
|
@ -13,11 +11,10 @@ select = E,W,F,N
|
|||
# E305: expected 2 blank lines after end of function or class
|
||||
# E402: module level import not at top of file
|
||||
# E731: do not assign a lambda expression, use a def
|
||||
# E901: SyntaxError or IndentationError
|
||||
# W601: .has_key() is deprecated, use ‘in’
|
||||
# N801: class names should use CapWords convention
|
||||
# N802: function name should be lowercase
|
||||
ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,N801,N802
|
||||
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,W601,N801,N802
|
||||
exclude =
|
||||
.tox,
|
||||
pywebsocket,
|
24
tests/wpt/web-platform-tests/tools/py36-flake8.ini
Normal file
24
tests/wpt/web-platform-tests/tools/py36-flake8.ini
Normal file
|
@ -0,0 +1,24 @@
|
|||
[flake8]
|
||||
select = E,W,F,N
|
||||
# E128: continuation line under-indented for visual indent
|
||||
# E129: visually indented line with same indent as next logical line
|
||||
# E226: missing whitespace around arithmetic operator
|
||||
# E231: missing whitespace after ‘,’, ‘;’, or ‘:’
|
||||
# E251: unexpected spaces around keyword / parameter equals
|
||||
# E265: block comment should start with ‘# ‘
|
||||
# E302: expected 2 blank lines, found 0
|
||||
# E303: too many blank lines (3)
|
||||
# E305: expected 2 blank lines after end of function or class
|
||||
# E402: module level import not at top of file
|
||||
# E731: do not assign a lambda expression, use a def
|
||||
# N801: class names should use CapWords convention
|
||||
# N802: function name should be lowercase
|
||||
ignore = E128,E129,E226,E231,E251,E265,E302,E303,E305,E402,E731,N801,N802
|
||||
exclude =
|
||||
.tox,
|
||||
pywebsocket,
|
||||
third_party,
|
||||
wptrunner,
|
||||
wptserve/docs/conf.py,
|
||||
wptserve/tests/functional/docroot/invalid.py
|
||||
max-line-length = 141
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py27,py36,pypy,py27-flake8
|
||||
envlist = py27,py36,pypy,{py27,py36}-flake8
|
||||
skipsdist=True
|
||||
|
||||
[testenv]
|
||||
|
@ -16,5 +16,9 @@ passenv =
|
|||
HYPOTHESIS_PROFILE
|
||||
|
||||
[testenv:py27-flake8]
|
||||
deps = -r{toxinidir}/requirements_flake8.txt
|
||||
commands = flake8 --append-config={toxinidir}/flake8.ini {posargs}
|
||||
deps = -r requirements_flake8.txt
|
||||
commands = flake8 --append-config=py27-flake8.ini {posargs}
|
||||
|
||||
[testenv:py36-flake8]
|
||||
deps = -r requirements_flake8.txt
|
||||
commands = flake8 --append-config=py36-flake8.ini {posargs}
|
||||
|
|
|
@ -58,8 +58,8 @@ def run(venv, **kwargs):
|
|||
channel = get_channel(browser, kwargs["channel"])
|
||||
|
||||
if channel != kwargs["channel"]:
|
||||
print "Interpreting channel '%s' as '%s'" % (kwargs["channel"],
|
||||
channel)
|
||||
print("Interpreting channel '%s' as '%s'" % (kwargs["channel"],
|
||||
channel))
|
||||
|
||||
if destination is None:
|
||||
if venv:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from functools import reduce
|
||||
|
||||
def format_comment_title(product):
|
||||
"""Produce a Markdown-formatted string based on a given "product"--a string
|
||||
containing a browser identifier optionally followed by a colon and a
|
||||
|
|
|
@ -3,6 +3,7 @@ import os
|
|||
import platform
|
||||
import sys
|
||||
from distutils.spawn import find_executable
|
||||
from six.moves import input
|
||||
|
||||
wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(wpt_root, "tools")))
|
||||
|
@ -154,7 +155,7 @@ class BrowserSetup(object):
|
|||
if not self.prompt:
|
||||
return True
|
||||
while True:
|
||||
resp = raw_input("Download and install %s [Y/n]? " % component).strip().lower()
|
||||
resp = input("Download and install %s [Y/n]? " % component).strip().lower()
|
||||
if not resp or resp == "y":
|
||||
return True
|
||||
elif resp == "n":
|
||||
|
|
|
@ -443,9 +443,9 @@ def test_serve():
|
|||
assert False, "server did not start responding within 60s"
|
||||
try:
|
||||
resp = urllib2.urlopen("http://web-platform.test:8000")
|
||||
print resp
|
||||
print(resp)
|
||||
except urllib2.URLError:
|
||||
print "URLError"
|
||||
print("URLError")
|
||||
time.sleep(1)
|
||||
else:
|
||||
assert resp.code == 200
|
||||
|
|
|
@ -39,7 +39,7 @@ class Virtualenv(object):
|
|||
|
||||
def activate(self):
|
||||
path = os.path.join(self.bin_path, "activate_this.py")
|
||||
execfile(path, {"__file__": path})
|
||||
execfile(path, {"__file__": path}) # noqa: F821
|
||||
|
||||
def start(self):
|
||||
if not self.exists:
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
var callback = arguments[arguments.length - 1];
|
||||
window.opener.testdriver_callback = callback;
|
||||
window.opener.testdriver_callback = function(results) {
|
||||
/**
|
||||
* The current window and its opener belong to the same domain, making it
|
||||
* technically possible for data structures to be shared directly.
|
||||
* Unfortunately, some browser/WebDriver implementations incorrectly
|
||||
* serialize Arrays from foreign realms [1]. This issue does not extend to
|
||||
* the behavior of `JSON.stringify` and `JSON.parse` in these
|
||||
* implementations. Use that API to re-create the data structure in the local
|
||||
* realm to avoid the problem in the non-conforming browsers.
|
||||
*
|
||||
* [1] This has been observed in Edge version 17 and/or the corresponding
|
||||
* release of Edgedriver
|
||||
*/
|
||||
try {
|
||||
results = JSON.parse(JSON.stringify(results));
|
||||
} catch (error) {}
|
||||
|
||||
callback(results);
|
||||
};
|
||||
window.opener.process_next_event();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue