mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1197365 - Update to latest wptrunner, a=testonly
This commit is contained in:
parent
67fb17e505
commit
15fdb4dcb0
@ -53,8 +53,14 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
|
||||
executor_kwargs = base_executor_kwargs(test_type, server_config,
|
||||
cache_manager, **kwargs)
|
||||
executor_kwargs["close_after_done"] = True
|
||||
if run_info_data["debug"] and kwargs["timeout_multiplier"] is None:
|
||||
executor_kwargs["timeout_multiplier"] = 3
|
||||
if kwargs["timeout_multiplier"] is None:
|
||||
if kwargs["gecko_e10s"] and test_type == "reftest":
|
||||
if run_info_data["debug"]:
|
||||
executor_kwargs["timeout_multiplier"] = 4
|
||||
else:
|
||||
executor_kwargs["timeout_multiplier"] = 2
|
||||
elif run_info_data["debug"]:
|
||||
executor_kwargs["timeout_multiplier"] = 3
|
||||
return executor_kwargs
|
||||
|
||||
|
||||
|
@ -37,8 +37,10 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
|
||||
rv["pause_after_test"] = kwargs["pause_after_test"]
|
||||
return rv
|
||||
|
||||
|
||||
def env_options():
|
||||
return {"host": "localhost",
|
||||
return {"host": "127.0.0.1",
|
||||
"external_host": "web-platform.test",
|
||||
"bind_hostname": "true",
|
||||
"testharnessreport": "testharnessreport-servo.js",
|
||||
"supports_debugger": True}
|
||||
|
@ -49,7 +49,8 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kw
|
||||
|
||||
|
||||
def env_options():
|
||||
return {"host": "web-platform.test",
|
||||
return {"host": "127.0.0.1",
|
||||
"external_host": "web-platform.test",
|
||||
"bind_hostname": "true",
|
||||
"testharnessreport": "testharnessreport-servodriver.js",
|
||||
"supports_debugger": True}
|
||||
|
@ -36,7 +36,8 @@ class ServoWebDriverProtocol(Protocol):
|
||||
|
||||
session_started = False
|
||||
try:
|
||||
self.session = webdriver.Session(self.host, self.port)
|
||||
self.session = webdriver.Session(self.host, self.port,
|
||||
extension=webdriver.ServoExtensions)
|
||||
self.session.start()
|
||||
except:
|
||||
self.logger.warning(
|
||||
@ -82,6 +83,11 @@ class ServoWebDriverProtocol(Protocol):
|
||||
self.logger.error(traceback.format_exc(e))
|
||||
break
|
||||
|
||||
def on_environment_change(self, old_environment, new_environment):
|
||||
#Unset all the old prefs
|
||||
self.session.extension.reset_prefs(*old_environment.get("prefs", {}).keys())
|
||||
self.session.extension.set_prefs(new_environment.get("prefs", {}))
|
||||
|
||||
|
||||
class ServoWebDriverRun(object):
|
||||
def __init__(self, func, session, url, timeout, current_timeout=None):
|
||||
|
@ -346,7 +346,8 @@ class Find(object):
|
||||
|
||||
|
||||
class Session(object):
|
||||
def __init__(self, host, port, url_prefix="", desired_capabilities=None, port_timeout=60):
|
||||
def __init__(self, host, port, url_prefix="", desired_capabilities=None, port_timeout=60,
|
||||
extension=None):
|
||||
self.transport = Transport(host, port, url_prefix, port_timeout)
|
||||
self.desired_capabilities = desired_capabilities
|
||||
self.session_id = None
|
||||
@ -354,6 +355,8 @@ class Session(object):
|
||||
self.window = None
|
||||
self.find = None
|
||||
self._element_cache = {}
|
||||
self.extension = None
|
||||
self.extension_cls = extension
|
||||
|
||||
def start(self):
|
||||
desired_capabilities = self.desired_capabilities if self.desired_capabilities else {}
|
||||
@ -365,6 +368,8 @@ class Session(object):
|
||||
self.timeouts = Timeouts(self)
|
||||
self.window = Window(self)
|
||||
self.find = Find(self)
|
||||
if self.extension_cls:
|
||||
self.extension = self.extension_cls(self)
|
||||
|
||||
return rv["value"]
|
||||
|
||||
@ -376,6 +381,7 @@ class Session(object):
|
||||
self.timeouts = None
|
||||
self.window = None
|
||||
self.find = None
|
||||
self.extension = None
|
||||
self.transport.close_connection()
|
||||
|
||||
def __enter__(self):
|
||||
@ -579,9 +585,37 @@ class Element(object):
|
||||
@property
|
||||
@command
|
||||
def text(self):
|
||||
return self.session.send_command("GET", self.url("text"), key="value")
|
||||
return self.session.send_command("GET", self.url("text"))
|
||||
|
||||
@property
|
||||
@command
|
||||
def name(self):
|
||||
return self.session.send_command("GET", self.url("name"), key="value")
|
||||
return self.session.send_command("GET", self.url("name"))
|
||||
|
||||
@command
|
||||
def css(self, property_name):
|
||||
return self.session.send_command("GET", self.url("css/%s" % property_name))
|
||||
|
||||
@property
|
||||
@command
|
||||
def rect(self):
|
||||
return self.session.send_command("GET", self.url("rect"))
|
||||
|
||||
class ServoExtensions(object):
|
||||
def __init__(self, session):
|
||||
self.session = session
|
||||
|
||||
@command
|
||||
def get_prefs(self, *prefs):
|
||||
body = {"prefs": list(prefs)}
|
||||
return self.session.send_command("POST", "servo/prefs/get", body)
|
||||
|
||||
@command
|
||||
def set_prefs(self, prefs):
|
||||
body = {"prefs": prefs}
|
||||
return self.session.send_command("POST", "servo/prefs/set", body)
|
||||
|
||||
@command
|
||||
def reset_prefs(self, *prefs):
|
||||
body = {"prefs": list(prefs)}
|
||||
return self.session.send_command("POST", "servo/prefs/reset", body)
|
||||
|
@ -274,6 +274,8 @@ class GitTree(object):
|
||||
:param branch: Branch name to use
|
||||
:param force: Force-checkout
|
||||
"""
|
||||
assert rev is not None
|
||||
|
||||
args = []
|
||||
if branch:
|
||||
branches = [ref[len("refs/heads/"):] for sha1, ref in self.list_refs()
|
||||
|
Loading…
Reference in New Issue
Block a user