Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch WebKit browser product to WebDriver executors #13339

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions tools/wptrunner/wptrunner/browsers/webkit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .base import Browser, ExecutorBrowser, require_arg
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401
SeleniumRefTestExecutor) # noqa: F401
from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
WebDriverRefTestExecutor) # noqa: F401
from ..executors.executorwebkit import WebKitDriverWdspecExecutor # noqa: F401
from ..webdriver_server import WebKitDriverServer

Expand All @@ -10,8 +10,8 @@
"check_args": "check_args",
"browser": "WebKitBrowser",
"browser_kwargs": "browser_kwargs",
"executor": {"testharness": "SeleniumTestharnessExecutor",
"reftest": "SeleniumRefTestExecutor",
"executor": {"testharness": "WebDriverTestharnessExecutor",
"reftest": "WebDriverRefTestExecutor",
"wdspec": "WebKitDriverWdspecExecutor"},
"executor_kwargs": "executor_kwargs",
"env_extras": "env_extras",
Expand All @@ -31,18 +31,21 @@ def browser_kwargs(test_type, run_info_data, config, **kwargs):


def capabilities_for_port(server_config, **kwargs):
from selenium.webdriver import DesiredCapabilities

if kwargs["webkit_port"] == "gtk":
capabilities = dict(DesiredCapabilities.WEBKITGTK.copy())
capabilities["webkitgtk:browserOptions"] = {
"binary": kwargs["binary"],
"args": kwargs.get("binary_args", []),
"certificates": [
{"host": server_config["browser_host"],
"certificateFile": kwargs["host_cert_path"]}
]
capabilities = {
"browserName": "MiniBrowser",
"browserVersion": "2.20",
"platformName": "ANY",
"webkitgtk:browserOptions": {
"binary": kwargs["binary"],
"args": kwargs.get("binary_args", []),
"certificates": [
{"host": server_config["browser_host"],
"certificateFile": kwargs["host_cert_path"]}
]
}
}

return capabilities

return {}
Expand Down