Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web Platform Tests in Headless Mode

43 views
Skip to first unread message

Michael Smith

unread,
Sep 1, 2017, 5:27:50 PM9/1/17
to dev-pl...@lists.mozilla.org
Hi everyone,

This is a quick note to announce that the Web Platform Tests are
headless mode compatible. (I say "announce", but this has really been
the case since https://bugzil.la/1373739 was resolved.)

This means that you can run one or more web platform tests without
having actual Firefox windows pop up and steal your focus. Just run with
the "MOZ_HEADLESS=1" environment variable set, as well as
MOZ_HEADLESS_WIDTH and MOZ_HEADLESS_HEIGHT set to an appropriate fake
screen width and height. The Web Platform Tests expect a 1600x1200
resolution on Linux and macOS and 1024x768 on Windows.

MOZ_HEADLESS=1 MOZ_HEADLESS_WIDTH=1600 MOZ_HEADLESS_HEIGHT=1200 ./mach
web-platform-tests
/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.htm

Headless mode Web Platform Tests aren't being run automatically on CI
yet, but as of https://bugzil.la/1373739 they should all produce
equivalent outcomes to non-headless runs. If you do encounter any
differences, please file bugs against the "Firefox: Headless" component.

-Michael Smith [:mismith]

Michael Smith

unread,
Sep 1, 2017, 6:16:40 PM9/1/17
to dev-pl...@lists.mozilla.org
(One addition you may want to make is passing the --no-pause-after-test
option to ./mach web-platform-tests. The default behavior is to pause so
that you can see the test output in the Firefox window; in headless mode
this isn't so helpful. Thanks :bz!)

-Michael
0 new messages