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

Make desktop webdriver WPT harness work #22411

Merged
merged 5 commits into from Dec 11, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add headless support to servodriver harness.

  • Loading branch information
jdm committed Dec 11, 2018
commit 832b7963f23f987d1776b2a680dd1ecbe084d6bd
@@ -40,6 +40,7 @@ def browser_kwargs(test_type, run_info_data, config, **kwargs):
"debug_info": kwargs["debug_info"],
"server_config": config,
"user_stylesheets": kwargs.get("user_stylesheets"),
"headless": kwargs.get("headless"),
}


@@ -75,7 +76,7 @@ class ServoWebDriverBrowser(Browser):
init_timeout = 300 # Large timeout for cases where we're booting an Android emulator

def __init__(self, logger, binary, debug_info=None, webdriver_host="127.0.0.1",
server_config=None, binary_args=None, user_stylesheets=None):
server_config=None, binary_args=None, user_stylesheets=None, headless=None):
Browser.__init__(self, logger)
self.binary = binary
self.binary_args = binary_args or []
@@ -87,6 +88,7 @@ def __init__(self, logger, binary, debug_info=None, webdriver_host="127.0.0.1",
self.server_ports = server_config.ports if server_config else {}
self.command = None
self.user_stylesheets = user_stylesheets if user_stylesheets else []
self.headless = headless if headless else False

def start(self, **kwargs):
self.webdriver_port = get_free_port(4444, exclude=self.used_ports)
@@ -112,6 +114,9 @@ def start(self, **kwargs):
self.debug_info
)

if self.headless:
command += ["--headless"]

for stylesheet in self.user_stylesheets:
command += ["--user-stylesheet", stylesheet]

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.