From dc97ad5a7865a4849678baf67c380a3cc7bb420b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20Dober=C5=A1ek?= Date: Wed, 3 Oct 2018 22:06:54 +0200 Subject: [PATCH] Switch WebKit browser product to WebDriver executors (#13339) 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. --- tools/wptrunner/wptrunner/browsers/webkit.py | 31 +++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tools/wptrunner/wptrunner/browsers/webkit.py b/tools/wptrunner/wptrunner/browsers/webkit.py index 9482f2f7743324..b09114a9a54447 100644 --- a/tools/wptrunner/wptrunner/browsers/webkit.py +++ b/tools/wptrunner/wptrunner/browsers/webkit.py @@ -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 @@ -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", @@ -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 {}