Auto merge of #8153 - jdm:wptdoc, r=Ms2ger

Add documentation for writing new tests.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8153)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-23 04:10:56 -06:00
commit 44e4f1ee5e

View file

@ -96,6 +96,26 @@ log is saved, run from the root directory:
For CSSWG tests a similar prcedure works, with `./mach test-css` and
`./mach update-css`.
Writing new tests
=================
The simplest way to create a new test is to use the following command:
./mach create-wpt tests/wpt/path/to/new/test.html --no-run
This will create test.html in the appropriate directory using the WPT
template for JavaScript tests. To create a new reference test instead,
use the following:
./mach create-wpt --reftest tests/wpt/path/to/new/reftest.html --no-run --reference tests/wpt/path/to/reference.html
`reference.html` will be created if it doesn't not exist, and `reftest.html`
will be created using the WPT reftest template. These new tests can then
be run in the following manner like any other WPT test:
./mach test-wpt tests/wpt/path/to/new/test.html
./mach test-wpt tests/wpt/path/to/new/reftest.html
Editing tests
=============