mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Update web-platform-tests to revision 9fc797e6e5fb7d244dfb5b5125886c01f8cedf2b
This commit is contained in:
parent
b7e9bab267
commit
6dda93c6e2
55 changed files with 646 additions and 128 deletions
|
@ -51,6 +51,7 @@ or
|
|||
# run echo client to test IETF HyBi 00 protocol
|
||||
run with --protocol-version=hybi00
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
import base64
|
||||
|
@ -940,15 +941,15 @@ class EchoClient(object):
|
|||
for line in self._options.message.split(','):
|
||||
self._stream.send_message(line)
|
||||
if self._options.verbose:
|
||||
print 'Send: %s' % line
|
||||
print('Send: %s' % line)
|
||||
try:
|
||||
received = self._stream.receive_message()
|
||||
|
||||
if self._options.verbose:
|
||||
print 'Recv: %s' % received
|
||||
print('Recv: %s' % received)
|
||||
except Exception, e:
|
||||
if self._options.verbose:
|
||||
print 'Error: %s' % e
|
||||
print('Error: %s' % e)
|
||||
raise
|
||||
|
||||
self._do_closing_handshake()
|
||||
|
@ -964,15 +965,15 @@ class EchoClient(object):
|
|||
self._logger.info('Wait for server-initiated closing handshake')
|
||||
message = self._stream.receive_message()
|
||||
if message is None:
|
||||
print 'Recv close'
|
||||
print 'Send ack'
|
||||
print('Recv close')
|
||||
print('Send ack')
|
||||
self._logger.info(
|
||||
'Received closing handshake and sent ack')
|
||||
return
|
||||
print 'Send close'
|
||||
print('Send close')
|
||||
self._stream.close_connection()
|
||||
self._logger.info('Sent closing handshake')
|
||||
print 'Recv ack'
|
||||
print('Recv ack')
|
||||
self._logger.info('Received ack')
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
|
||||
"""Tests for msgutil module."""
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
import array
|
||||
|
@ -884,7 +885,7 @@ class PerMessageDeflateTest(unittest.TestCase):
|
|||
compressed_empty = compressed_empty[:-4]
|
||||
expected += '\x80%c' % len(compressed_empty)
|
||||
expected += compressed_empty
|
||||
print '%r' % expected
|
||||
print('%r' % expected)
|
||||
self.assertEqual(expected, request.connection.written_data())
|
||||
|
||||
def test_send_message_fragmented_empty_last_frame(self):
|
||||
|
@ -1064,7 +1065,7 @@ class PerMessageDeflateTest(unittest.TestCase):
|
|||
|
||||
frame_count += 1
|
||||
|
||||
print "Chunk sizes: %r" % chunk_sizes
|
||||
print("Chunk sizes: %r" % chunk_sizes)
|
||||
self.assertTrue(len(chunk_sizes) > 10)
|
||||
|
||||
# Close frame
|
||||
|
@ -1167,9 +1168,9 @@ class PerMessageDeflateTest(unittest.TestCase):
|
|||
compress = None
|
||||
finish_used = True
|
||||
|
||||
print "Chunk sizes: %r" % chunk_sizes
|
||||
print("Chunk sizes: %r" % chunk_sizes)
|
||||
self.assertTrue(len(chunk_sizes) > 10)
|
||||
print "Methods: %r" % methods
|
||||
print("Methods: %r" % methods)
|
||||
self.assertTrue(sync_used)
|
||||
self.assertTrue(finish_used)
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
|
||||
"""Tests for util module."""
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
import os
|
||||
|
@ -172,7 +173,7 @@ class InflaterDeflaterTest(unittest.TestCase):
|
|||
[chr(random.randint(0, 255)) for i in xrange(100 * 1024)])
|
||||
|
||||
chunked_input = get_random_section(source, 10)
|
||||
print "Input chunk sizes: %r" % [len(c) for c in chunked_input]
|
||||
print("Input chunk sizes: %r" % [len(c) for c in chunked_input])
|
||||
|
||||
deflater = util._Deflater(15)
|
||||
compressed = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
html5lib == 1.0.1
|
||||
mozinfo == 0.10
|
||||
mozlog==3.10
|
||||
mozlog==4.0
|
||||
mozdebug==0.1.1
|
||||
urllib3[secure]==1.24.1
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
|
@ -60,12 +62,12 @@ setup(name=PACKAGE_NAME,
|
|||
|
||||
if "install" in sys.argv:
|
||||
path = os.path.relpath(os.path.join(sys.prefix, "requirements"), os.curdir)
|
||||
print textwrap.fill("""In order to use with one of the built-in browser
|
||||
print(textwrap.fill("""In order to use with one of the built-in browser
|
||||
products, you will need to install the extra dependencies. These are provided
|
||||
as requirements_[name].txt in the %s directory and can be installed using
|
||||
e.g.""" % path, 80)
|
||||
e.g.""" % path, 80))
|
||||
|
||||
print """
|
||||
print("""
|
||||
|
||||
pip install -r %s/requirements_firefox.txt
|
||||
""" % path
|
||||
""" % path)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import ConfigParser
|
||||
import argparse
|
||||
import os
|
||||
|
@ -153,7 +154,7 @@ def main():
|
|||
if args.pdb:
|
||||
import pdb
|
||||
import traceback
|
||||
print traceback.format_exc()
|
||||
print(traceback.format_exc())
|
||||
pdb.post_mortem()
|
||||
else:
|
||||
raise
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from .base import Browser, ExecutorBrowser, require_arg
|
||||
from ..webdriver_server import EdgeDriverServer
|
||||
from ..executors import executor_kwargs as base_executor_kwargs
|
||||
|
@ -76,7 +77,7 @@ class EdgeBrowser(Browser):
|
|||
|
||||
|
||||
def start(self, **kwargs):
|
||||
print self.server.url
|
||||
print(self.server.url)
|
||||
self.server.start()
|
||||
|
||||
def stop(self, force=False):
|
||||
|
|
|
@ -372,7 +372,7 @@ class SeleniumRefTestExecutor(RefTestExecutor):
|
|||
"""return [window.outerWidth - window.innerWidth,
|
||||
window.outerHeight - window.innerHeight];"""
|
||||
)
|
||||
self.protocol.webdriver.set_window_size(600 + width_offset, 600 + height_offset)
|
||||
self.protocol.webdriver.set_window_rect(0, 0, 600 + width_offset, 600 + height_offset)
|
||||
|
||||
result = self.implementation.run_test(test)
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
|
@ -136,7 +137,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor):
|
|||
self.result_flag.set()
|
||||
else:
|
||||
if self.interactive:
|
||||
print line
|
||||
print(line)
|
||||
else:
|
||||
self.logger.process_output(self.proc.pid,
|
||||
line,
|
||||
|
@ -267,7 +268,7 @@ class ServoRefTestExecutor(ProcessTestExecutor):
|
|||
def on_output(self, line):
|
||||
line = line.decode("utf8", "replace")
|
||||
if self.interactive:
|
||||
print line
|
||||
print(line)
|
||||
else:
|
||||
self.logger.process_output(self.proc.pid,
|
||||
line,
|
||||
|
|
|
@ -405,6 +405,7 @@ class WebDriverRefTestExecutor(RefTestExecutor):
|
|||
"""return [window.outerWidth - window.innerWidth,
|
||||
window.outerHeight - window.innerHeight];"""
|
||||
)
|
||||
self.protocol.webdriver.window.position = (0, 0)
|
||||
self.protocol.webdriver.window.size = (600 + width_offset, 600 + height_offset)
|
||||
|
||||
result = self.implementation.run_test(test)
|
||||
|
|
|
@ -1 +1 @@
|
|||
var win = window.open("about:blank", "test", "width=600,height=600");
|
||||
var win = window.open("about:blank", "test", "left=0,top=0,width=600,height=600");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import itertools
|
||||
import os
|
||||
import urlparse
|
||||
|
@ -89,7 +90,7 @@ class ExpectedManifest(ManifestItem):
|
|||
def append(self, child):
|
||||
ManifestItem.append(self, child)
|
||||
if child.id in self.child_map:
|
||||
print "Warning: Duplicate heading %s" % child.id
|
||||
print("Warning: Duplicate heading %s" % child.id)
|
||||
self.child_map[child.id] = child
|
||||
|
||||
def _remove_child(self, child):
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import array
|
||||
import os
|
||||
import shutil
|
||||
|
@ -49,9 +50,9 @@ def update_expected(test_paths, serve_root, log_file_names,
|
|||
for test in updated_ini.iterchildren():
|
||||
for subtest in test.iterchildren():
|
||||
if subtest.new_disabled:
|
||||
print "disabled: %s" % os.path.dirname(subtest.root.test_path) + "/" + subtest.name
|
||||
print("disabled: %s" % os.path.dirname(subtest.root.test_path) + "/" + subtest.name)
|
||||
if test.new_disabled:
|
||||
print "disabled: %s" % test.root.test_path
|
||||
print("disabled: %s" % test.root.test_path)
|
||||
|
||||
|
||||
def do_delayed_imports(serve_root):
|
||||
|
@ -359,7 +360,7 @@ class ExpectedUpdater(object):
|
|||
try:
|
||||
test_data = self.id_test_map[test_id]
|
||||
except KeyError:
|
||||
print "Test not found %s, skipping" % test_id
|
||||
print("Test not found %s, skipping" % test_id)
|
||||
return
|
||||
|
||||
if self.ignore_existing:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
@ -29,7 +30,7 @@ def require_arg(kwargs, name, value_func=None):
|
|||
value_func = lambda x: x is not None
|
||||
|
||||
if name not in kwargs or not value_func(kwargs[name]):
|
||||
print >> sys.stderr, "Missing required argument %s" % name
|
||||
print("Missing required argument %s" % name, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
@ -417,7 +418,7 @@ def check_paths(kwargs):
|
|||
for test_paths in kwargs["test_paths"].itervalues():
|
||||
if not ("tests_path" in test_paths and
|
||||
"metadata_path" in test_paths):
|
||||
print "Fatal: must specify both a test path and metadata path"
|
||||
print("Fatal: must specify both a test path and metadata path")
|
||||
sys.exit(1)
|
||||
if "manifest_path" not in test_paths:
|
||||
test_paths["manifest_path"] = os.path.join(test_paths["metadata_path"],
|
||||
|
@ -431,11 +432,11 @@ def check_paths(kwargs):
|
|||
path = os.path.dirname(path)
|
||||
|
||||
if not os.path.exists(path):
|
||||
print "Fatal: %s path %s does not exist" % (name, path)
|
||||
print("Fatal: %s path %s does not exist" % (name, path))
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.isdir(path):
|
||||
print "Fatal: %s path %s is not a directory" % (name, path)
|
||||
print("Fatal: %s path %s is not a directory" % (name, path))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
@ -488,7 +489,7 @@ def check_args(kwargs):
|
|||
|
||||
if kwargs["binary"] is not None:
|
||||
if not os.path.exists(kwargs["binary"]):
|
||||
print >> sys.stderr, "Binary path %s does not exist" % kwargs["binary"]
|
||||
print("Binary path %s does not exist" % kwargs["binary"], file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if kwargs["ssl_type"] is None:
|
||||
|
@ -507,14 +508,14 @@ def check_args(kwargs):
|
|||
elif kwargs["ssl_type"] == "openssl":
|
||||
path = exe_path(kwargs["openssl_binary"])
|
||||
if path is None:
|
||||
print >> sys.stderr, "openssl-binary argument missing or not a valid executable"
|
||||
print("openssl-binary argument missing or not a valid executable", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
kwargs["openssl_binary"] = path
|
||||
|
||||
if kwargs["ssl_type"] != "none" and kwargs["product"] == "firefox" and kwargs["certutil_binary"]:
|
||||
path = exe_path(kwargs["certutil_binary"])
|
||||
if path is None:
|
||||
print >> sys.stderr, "certutil-binary argument missing or not a valid executable"
|
||||
print("certutil-binary argument missing or not a valid executable", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
kwargs["certutil_binary"] = path
|
||||
|
||||
|
@ -524,7 +525,7 @@ def check_args(kwargs):
|
|||
kwargs['extra_prefs'] = [kwargs['extra_prefs']]
|
||||
missing = any('=' not in prefarg for prefarg in kwargs['extra_prefs'])
|
||||
if missing:
|
||||
print >> sys.stderr, "Preferences via --setpref must be in key=value format"
|
||||
print("Preferences via --setpref must be in key=value format", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
kwargs['extra_prefs'] = [tuple(prefarg.split('=', 1)) for prefarg in
|
||||
kwargs['extra_prefs']]
|
||||
|
@ -551,7 +552,7 @@ def check_args_update(kwargs):
|
|||
|
||||
for item in kwargs["run_log"]:
|
||||
if os.path.isdir(item):
|
||||
print >> sys.stderr, "Log file %s is a directory" % item
|
||||
print("Log file %s is a directory" % item, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
return kwargs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from __future__ import unicode_literals
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import json
|
||||
import os
|
||||
|
@ -91,7 +91,7 @@ def list_test_groups(test_paths, product, **kwargs):
|
|||
run_info_extras=run_info_extras, **kwargs)
|
||||
|
||||
for item in sorted(test_loader.groups(kwargs["test_types"])):
|
||||
print item
|
||||
print(item)
|
||||
|
||||
|
||||
def list_disabled(test_paths, product, **kwargs):
|
||||
|
@ -107,7 +107,7 @@ def list_disabled(test_paths, product, **kwargs):
|
|||
for test_type, tests in test_loader.disabled_tests.iteritems():
|
||||
for test in tests:
|
||||
rv.append({"test": test.id, "reason": test.disabled()})
|
||||
print json.dumps(rv, indent=2)
|
||||
print(json.dumps(rv, indent=2))
|
||||
|
||||
|
||||
def list_tests(test_paths, product, **kwargs):
|
||||
|
@ -119,7 +119,7 @@ def list_tests(test_paths, product, **kwargs):
|
|||
run_info_extras=run_info_extras, **kwargs)
|
||||
|
||||
for test in test_loader.test_ids:
|
||||
print test
|
||||
print(test)
|
||||
|
||||
|
||||
def get_pause_after_test(test_loader, **kwargs):
|
||||
|
@ -361,7 +361,7 @@ def main():
|
|||
if kwargs["pdb"]:
|
||||
import pdb
|
||||
import traceback
|
||||
print traceback.format_exc()
|
||||
print(traceback.format_exc())
|
||||
pdb.post_mortem()
|
||||
else:
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue