Skip to content

Commit

Permalink
Switch WebKit browser product to WebDriver executors (#13339)
Browse files Browse the repository at this point in the history
Switch away from Selenium executors to WebDriverTestharnessExecutor and WebDriverRefTestExecutor for the WebKit browser product.

The browserVersion value is hard-coded to the 2.20 release series for the GTK+ port of WebKit as that's when the WebDriver functionality was introduced.
  • Loading branch information
zdobersek authored and Ms2ger committed Oct 3, 2018
1 parent 4254304 commit dc97ad5
Showing 1 changed file with 17 additions and 14 deletions.
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

0 comments on commit dc97ad5

Please sign in to comment.