Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r227291 - Unreviewed. Update W3C WebDriver imported tests.
* imported/w3c/importer.json: * imported/w3c/tools/webdriver/webdriver/client.py: * imported/w3c/tools/webdriver/webdriver/protocol.py: * imported/w3c/tools/webdriver/webdriver/servo.py: Removed. * imported/w3c/tools/webdriver/webdriver/transport.py: * imported/w3c/tools/wptrunner/MANIFEST.in: * imported/w3c/tools/wptrunner/README.rst: * imported/w3c/tools/wptrunner/docs/conf.py: * imported/w3c/tools/wptrunner/docs/usage.rst: * imported/w3c/tools/wptrunner/setup.py: * imported/w3c/tools/wptrunner/tox.ini: * imported/w3c/tools/wptrunner/wptrunner/browsers/__init__.py: * imported/w3c/tools/wptrunner/wptrunner/browsers/b2g_setup/certtest_app.zip: Removed. * imported/w3c/tools/wptrunner/wptrunner/browsers/chrome_android.py: Copied from WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py. * imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py: * imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py: * imported/w3c/tools/wptrunner/wptrunner/browsers/servo.py: * imported/w3c/tools/wptrunner/wptrunner/environment.py: * imported/w3c/tools/wptrunner/wptrunner/executors/base.py: * imported/w3c/tools/wptrunner/wptrunner/executors/executormarionette.py: * imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py: * imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py: * imported/w3c/tools/wptrunner/wptrunner/executors/executorservodriver.py: * imported/w3c/tools/wptrunner/wptrunner/manifestupdate.py: * imported/w3c/tools/wptrunner/wptrunner/metadata.py: * imported/w3c/tools/wptrunner/wptrunner/stability.py: * imported/w3c/tools/wptrunner/wptrunner/testloader.py: * imported/w3c/tools/wptrunner/wptrunner/testrunner.py: * imported/w3c/tools/wptrunner/wptrunner/tests/test_hosts.py: * imported/w3c/tools/wptrunner/wptrunner/update/__init__.py: * imported/w3c/tools/wptrunner/wptrunner/update/sync.py: * imported/w3c/tools/wptrunner/wptrunner/update/tree.py: * imported/w3c/tools/wptrunner/wptrunner/vcs.py: * imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py: * imported/w3c/tools/wptrunner/wptrunner/wptcommandline.py: * imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py: * imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py: * imported/w3c/tools/wptrunner/wptrunner/wptrunner.py: * imported/w3c/tools/wptrunner/wptrunner/wpttest.py: * imported/w3c/webdriver/tests/execute_async_script/__init__.py: Added. * imported/w3c/webdriver/tests/execute_script/__init__.py: Added. * imported/w3c/webdriver/tests/sessions/new_session/response.py:
- Loading branch information
1 parent
f07be2b
commit 0653114
Showing
43 changed files
with
287 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
WebDriverTests/imported/w3c/tools/webdriver/webdriver/servo.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
""" | ||
|
||
product_list = ["chrome", | ||
"chrome_android", | ||
"edge", | ||
"firefox", | ||
"ie", | ||
|
Binary file removed
BIN
-1.21 KB
WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/browsers/b2g_setup/certtest_app.zip
Binary file not shown.
98 changes: 98 additions & 0 deletions
98
WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/browsers/chrome_android.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
from .base import Browser, ExecutorBrowser, require_arg | ||
from ..webdriver_server import ChromeDriverServer | ||
from ..executors import executor_kwargs as base_executor_kwargs | ||
from ..executors.executorselenium import (SeleniumTestharnessExecutor, | ||
SeleniumRefTestExecutor) | ||
from ..executors.executorchrome import ChromeDriverWdspecExecutor | ||
|
||
|
||
__wptrunner__ = {"product": "chrome_android", | ||
"check_args": "check_args", | ||
"browser": "ChromeAndroidBrowser", | ||
"executor": {"testharness": "SeleniumTestharnessExecutor", | ||
"reftest": "SeleniumRefTestExecutor", | ||
"wdspec": "ChromeDriverWdspecExecutor"}, | ||
"browser_kwargs": "browser_kwargs", | ||
"executor_kwargs": "executor_kwargs", | ||
"env_extras": "env_extras", | ||
"env_options": "env_options"} | ||
|
||
|
||
def check_args(**kwargs): | ||
require_arg(kwargs, "webdriver_binary") | ||
|
||
|
||
def browser_kwargs(test_type, run_info_data, **kwargs): | ||
return {"binary": kwargs["binary"], | ||
"webdriver_binary": kwargs["webdriver_binary"], | ||
"webdriver_args": kwargs.get("webdriver_args")} | ||
|
||
|
||
def executor_kwargs(test_type, server_config, cache_manager, run_info_data, | ||
**kwargs): | ||
from selenium.webdriver import DesiredCapabilities | ||
|
||
executor_kwargs = base_executor_kwargs(test_type, server_config, | ||
cache_manager, **kwargs) | ||
executor_kwargs["close_after_done"] = True | ||
capabilities = dict(DesiredCapabilities.CHROME.items()) | ||
capabilities["chromeOptions"] = {} | ||
# required to start on mobile | ||
capabilities["chromeOptions"]["androidPackage"] = "com.android.chrome" | ||
|
||
for (kwarg, capability) in [("binary", "binary"), ("binary_args", "args")]: | ||
if kwargs[kwarg] is not None: | ||
capabilities["chromeOptions"][capability] = kwargs[kwarg] | ||
if test_type == "testharness": | ||
capabilities["useAutomationExtension"] = False | ||
capabilities["excludeSwitches"] = ["enable-automation"] | ||
if test_type == "wdspec": | ||
capabilities["chromeOptions"]["w3c"] = True | ||
executor_kwargs["capabilities"] = capabilities | ||
return executor_kwargs | ||
|
||
|
||
def env_extras(**kwargs): | ||
return [] | ||
|
||
|
||
def env_options(): | ||
return {"host": "web-platform.test", | ||
"bind_hostname": "true"} | ||
|
||
|
||
class ChromeAndroidBrowser(Browser): | ||
"""Chrome is backed by chromedriver, which is supplied through | ||
``wptrunner.webdriver.ChromeDriverServer``. | ||
""" | ||
|
||
def __init__(self, logger, binary, webdriver_binary="chromedriver", | ||
webdriver_args=None): | ||
"""Creates a new representation of Chrome. The `binary` argument gives | ||
the browser binary to use for testing.""" | ||
Browser.__init__(self, logger) | ||
self.binary = binary | ||
self.server = ChromeDriverServer(self.logger, | ||
binary=webdriver_binary, | ||
args=webdriver_args) | ||
|
||
def start(self, **kwargs): | ||
self.server.start(block=False) | ||
|
||
def stop(self, force=False): | ||
self.server.stop(force=force) | ||
|
||
def pid(self): | ||
return self.server.pid | ||
|
||
def is_alive(self): | ||
# TODO(ato): This only indicates the driver is alive, | ||
# and doesn't say anything about whether a browser session | ||
# is active. | ||
return self.server.is_alive() | ||
|
||
def cleanup(self): | ||
self.stop() | ||
|
||
def executor_browser(self): | ||
return ExecutorBrowser, {"webdriver_url": self.server.url} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.