Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -7,7 +7,28 @@ in a browser window. For running larger groups of tests, or running
tests frequently, this is not a practical approach and several better
options exist.
## From the Command Line
The simplest way to run tests is to use the `wpt run` command from the
root of the repository. This will automatically load the tests in the
chosen browser, and extract the test results. For example to run the
`dom/historical.html` tests in a local copy of Chrome:
./wpt run chrome dom/historical.html
Or to run in a specified copy of Firefox:
./wpt run --binary ~/local/firefox/firefox firefox dom/historical.html
On Windows `edge` is also supported, and if you have a sauce labs
account, any browser can be run using product `sauce`. For details on
how to pass information to sauce, including credentials see `./wpt run
--help`. That also details a large number of other options for
customising the test run.
## From Inside a Browser
Tests that have been merged on GitHub are mirrored at [http://w3c-test.org/].
For running multiple tests inside a browser, there is a test runner
located at `/tools/runner/index.html`.
@ -24,27 +45,13 @@ more than one reference involved.
Because it runs entirely in-browser, this runner cannot deal with
edge-cases like tests that cause the browser to crash or hang.
## By Automating the Browser
For automated test running designed to be robust enough to use in a CI
environment, the [wptrunner](https://github.com/w3c/wptrunner) test runner
can be used. This is a test runner written in Python and designed to
control the browser from the outside using some remote control
protocol such as WebDriver. This allows it to handle cases such as the
browser crashing that cannot be handled by an in-browser harness. It
also has the ability to automatically run both testharness-based tests
and reftests.
Full instructions for using wptrunner are provided in its own
[documentation](https://wptrunner.readthedocs.org).
## Writing Your Own Runner
Most test runners have two stages: finding all tests, followed by
executing them (or a subset thereof).
To find all tests in the repository, it is **strongly** recommended to
use the included `manifest` tool: the required behaviors are more
use the included `wpt manifest` tool: the required behaviors are more
complex than what are documented (especially when it comes to
precedence of the various possibilities and some undocumented legacy
ways to define test types), and hence its behavior should be