mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Enable wdspec and crashtest tests in servodriver. (#34955)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
2115b6a6db
commit
0c0ffefb48
4 changed files with 27 additions and 5 deletions
|
@ -93,7 +93,7 @@ def run_tests(default_binary_path: str, **kwargs):
|
||||||
if not kwargs.get("no_default_test_types"):
|
if not kwargs.get("no_default_test_types"):
|
||||||
test_types = {
|
test_types = {
|
||||||
"servo": ["testharness", "reftest", "wdspec", "crashtest"],
|
"servo": ["testharness", "reftest", "wdspec", "crashtest"],
|
||||||
"servodriver": ["testharness", "reftest"],
|
"servodriver": ["testharness", "reftest", "wdspec", "crashtest"],
|
||||||
}
|
}
|
||||||
product = kwargs.get("product") or "servo"
|
product = kwargs.get("product") or "servo"
|
||||||
kwargs["test_types"] = test_types[product]
|
kwargs["test_types"] = test_types[product]
|
||||||
|
|
4
tests/wpt/meta/MANIFEST.json
vendored
4
tests/wpt/meta/MANIFEST.json
vendored
|
@ -503811,7 +503811,7 @@
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"servodriver.py": [
|
"servodriver.py": [
|
||||||
"d3cc341babecb750ad55862997e52efcdc4c7491",
|
"f8f50537740eea0c169af68becd42c8bc22ae0f7",
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"webkit.py": [
|
"webkit.py": [
|
||||||
|
@ -503877,7 +503877,7 @@
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"executorservodriver.py": [
|
"executorservodriver.py": [
|
||||||
"41b8ed9ac1891edb7ec332c61923314f8b1e5f19",
|
"7e4aee5e7af7b9719b4ccb1f5a0a7c7cb3aa1653",
|
||||||
[]
|
[]
|
||||||
],
|
],
|
||||||
"executorwebdriver.py": [
|
"executorwebdriver.py": [
|
||||||
|
|
|
@ -10,8 +10,10 @@ from .base import (WebDriverBrowser,
|
||||||
get_free_port)
|
get_free_port)
|
||||||
from .base import get_timeout_multiplier # noqa: F401
|
from .base import get_timeout_multiplier # noqa: F401
|
||||||
from ..executors import executor_kwargs as base_executor_kwargs
|
from ..executors import executor_kwargs as base_executor_kwargs
|
||||||
|
from ..executors.base import WdspecExecutor # noqa: F401
|
||||||
from ..executors.executorservodriver import (ServoWebDriverTestharnessExecutor, # noqa: F401
|
from ..executors.executorservodriver import (ServoWebDriverTestharnessExecutor, # noqa: F401
|
||||||
ServoWebDriverRefTestExecutor) # noqa: F401
|
ServoWebDriverRefTestExecutor, # noqa: F401
|
||||||
|
ServoWebDriverCrashtestExecutor) # noqa: F401
|
||||||
|
|
||||||
here = os.path.dirname(__file__)
|
here = os.path.dirname(__file__)
|
||||||
|
|
||||||
|
@ -22,6 +24,8 @@ __wptrunner__ = {
|
||||||
"executor": {
|
"executor": {
|
||||||
"testharness": "ServoWebDriverTestharnessExecutor",
|
"testharness": "ServoWebDriverTestharnessExecutor",
|
||||||
"reftest": "ServoWebDriverRefTestExecutor",
|
"reftest": "ServoWebDriverRefTestExecutor",
|
||||||
|
"crashtest": "ServoWebDriverCrashtestExecutor",
|
||||||
|
"wdspec": "WdspecExecutor",
|
||||||
},
|
},
|
||||||
"browser_kwargs": "browser_kwargs",
|
"browser_kwargs": "browser_kwargs",
|
||||||
"executor_kwargs": "executor_kwargs",
|
"executor_kwargs": "executor_kwargs",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from .executorwebdriver import WebDriverProtocol, WebDriverTestharnessExecutor, WebDriverRefTestExecutor
|
from .executorwebdriver import WebDriverProtocol, WebDriverTestharnessExecutor, WebDriverRefTestExecutor, WebDriverCrashtestExecutor
|
||||||
|
|
||||||
webdriver = None
|
webdriver = None
|
||||||
ServoCommandExtensions = None
|
ServoCommandExtensions = None
|
||||||
|
@ -108,3 +108,21 @@ class ServoWebDriverRefTestExecutor(WebDriverRefTestExecutor):
|
||||||
self.last_environment.get("prefs", {}),
|
self.last_environment.get("prefs", {}),
|
||||||
new_environment.get("prefs", {})
|
new_environment.get("prefs", {})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class ServoWebDriverCrashtestExecutor(WebDriverCrashtestExecutor):
|
||||||
|
protocol_cls = ServoWebDriverProtocol
|
||||||
|
|
||||||
|
def __init__(self, logger, browser, server_config, timeout_multiplier=1,
|
||||||
|
screenshot_cache=None, capabilities={}, debug_info=None,
|
||||||
|
**kwargs):
|
||||||
|
WebDriverCrashtestExecutor.__init__(self, logger, browser, server_config,
|
||||||
|
timeout_multiplier, screenshot_cache,
|
||||||
|
capabilities=capabilities,
|
||||||
|
debug_info=debug_info)
|
||||||
|
|
||||||
|
def on_environment_change(self, new_environment):
|
||||||
|
self.protocol.webdriver.extension.change_prefs(
|
||||||
|
self.last_environment.get("prefs", {}),
|
||||||
|
new_environment.get("prefs", {})
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue