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

Add a headless mode command line option #13076

Merged
merged 3 commits into from
Sep 24, 2018
Merged

Add a headless mode command line option #13076

merged 3 commits into from
Sep 24, 2018

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Sep 19, 2018

For browsers which support headless mode starting wptrunner with
--headless will run the tests in headless mode; otherwise it will be
ignored.

--no-headless is avaiable to explicitly disable the mode when
frontends change the defaults.

For firefox switch the default for wpt run to be headless; for Chrome
changing the default broke some smoketests, so don't switch until that
is resolved. In all cases continue to run in a normal windowed mode in CI.

For browsers which support headless mode starting wptrunner with
--headless will run the tests in headless mode; otherwise it will be
ignored.

--no-headless is avaiable to explicitly disable the mode when
frontends change the defaults.

For firefox switch the default for wpt run to be headless; for Chrome
changing the default broke some smoketests, so don't switch until that
is resolved. In all cases continue to run in a normal windowed mode in CI.
@wpt-pr-bot wpt-pr-bot added ci infra wpt wptrunner The automated test runner, commonly called through ./wpt run labels Sep 19, 2018
config_group.add_argument("--headless", action="store_true",
help="Run browser in headless mode", default=None)
config_group.add_argument("--no-headless", action="store_false", dest="headless",
help="Don't run browser in headless mode")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we clarify what the default behaviour is in the help text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weirdly, not easily. Becausewpt run sets its own per-browser default. So we'd have to override the help text in that case.

@jgraham
Copy link
Contributor Author

jgraham commented Sep 24, 2018

Fixes #13076 and related to web-platform-tests/results-collection#603

@gsnedders
Copy link
Member

For firefox switch the default for wpt run to be headless; for Chrome
changing the default broke some smoketests, so don't switch until that
is resolved. In all cases continue to run in a normal windowed mode in CI.

Is there a bug filed for the Chrome issue?

@jgraham
Copy link
Contributor Author

jgraham commented Sep 24, 2018

It's much easier to file a bug if we merge this because it gives simpler STR.

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Enabling by default on Firefox but not on Chrome for now seems fine (assuming you've run the tests and there's no difference on Firefox w/ and w/o headless mode).

tools/wpt/run.py Outdated
# Allow WebRTC tests to call getUserMedia.
kwargs["extra_prefs"].append("media.navigator.streams.fake=true")



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: redundant blank link?

@jgraham jgraham merged commit 0200c63 into master Sep 24, 2018
jugglinmike added a commit to bocoup/results-collection that referenced this pull request Sep 24, 2018
As of [1] (merged on 2018-09-24), the WPT CLI enables the "headless"
mode of Chrome and Firefox by default. This mode is more convenient for
contributors running the tests from their development system, but it
also relies on functionality which is not enabled during typical usage
of the browsers.  Results collected in this mode are therefore less
authentic than results collected using a virtual display.

@jgraham commented on this in [2]:

> unless we have some reasonable assurance that headless mode matches
> non-headless in all cases (e.g. the relevant browser running both
> configurations in CI with identical results) I don't think we should
> enable it for wpt.fyi-ingested runs.

That issue includes evidence that the results are not equivalent,
meaning "headless" mode is not appropriate for publicly documenting the
capabilities of each browser.

Extend the results collection system to use the new `--no-headless`
command-line argument.

[1] web-platform-tests/wpt#13076
[2] web-platform-tests#603
@foolip foolip deleted the headless branch September 24, 2018 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci infra wpt wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants