servo/tests/wpt/web-platform-tests
Jonathan Chan 92ec8f15f0 Implement CSSStyleRule.selectorText.
We parse when assigning using the namespaces of the stylesheet. It isn't
clear if the spec says to do that (Firefox doesn't support the setter at
all, Chrome does, Safari doesn't); the spec issue is here:
https://github.com/w3c/csswg-drafts/issues/1511

Also fix ToCss implementation of AttrSelectorOperator to not pad with
spaces, to conform with CSSOM. This means we have to update some unit
tests that expect operators with spaces around them in attribute
selectors to roundtrip.

See the "attribute selector" section of "Serializing Selectors" here:
https://drafts.csswg.org/cssom/#serializing-selectors

CSSStyleRule.selectorText is specified here:
https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
2017-07-12 01:03:58 -07:00
..
2dcontext Add same-origin redirect variants to 2d canvas security tests. 2017-05-10 16:38:57 -04:00
accelerometer Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
ambient-light Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
annotation-model Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
annotation-protocol Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
annotation-vocab Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
apng Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
app-uri Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0 2016-09-09 16:17:14 +02:00
assumptions Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
auxclick Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
background-fetch Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
battery-status Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7 2016-06-24 11:36:34 +02:00
beacon Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
bluetooth Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
clear-site-data Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
clipboard Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
common Use the origin of the actual image response when determining if a canvas is origin clean. 2017-05-19 09:38:50 -04:00
compat Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
conformance-checkers Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
console Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
content-security-policy Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
cookies Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
cors Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
css Add some more tests for gradients 2017-06-21 20:19:06 +02:00
css-timing-1 Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
css-typed-om Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
css-values Add test for unset value storage 2016-12-21 14:36:24 +11:00
cssom Implement CSSStyleRule.selectorText. 2017-07-12 01:03:58 -07:00
cssom-view Fix several bugs related to scrolling 2017-06-19 21:43:35 +02:00
custom-elements Fix broken path to CE helper file 2017-06-23 21:09:59 -06:00
docs Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
dom Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
DOM-parsing/todo Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0 2016-09-09 16:17:14 +02:00
domparsing Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
domxpath Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
dpub-aam Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
dpub-aria Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
editing Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
encoding Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
encrypted-media Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
eventsource Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents
fetch Ignore mime type parameters in nosniff 2017-05-15 14:43:45 +02:00
FileAPI Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
fonts Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
fullscreen Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
gamepad Update web-platform-tests to revision 95aad3bd9b82b5c65d84d53517b65ba084de9394 2016-02-12 09:41:14 +01:00
generic-sensor Update web-platform-tests to revision 20fa4a3a71ab7a2f75b4febbe2e98aeeaf022c2b 2016-04-20 11:28:21 +02:00
geolocation-API Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
gyroscope Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
hr-time Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
html improve spec compliance of update the image data 2017-05-25 08:01:25 +08:00
html-imports Update web-platform-tests to 5582e4d2bfcfd1fa9f105406b143170ee2af7db1 2016-04-01 13:38:57 +02:00
html-longdesc Update web-platform-tests to revision 95aad3bd9b82b5c65d84d53517b65ba084de9394 2016-02-12 09:41:14 +01:00
html-media-capture Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
http Update web-platform-tests to revision 3b3585e368841b77caea8576fa56cef91c3fbdf0 2016-09-26 13:24:06 +02:00
imagebitmap-renderingcontext Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
images Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
IndexedDB Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
infrastructure Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
innerText Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
input-events Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
js Update web-platform-tests to revision d011702f368b88b3bae86e7a8fd2ddd22e18b33c 2016-04-12 10:47:32 +02:00
longtask-timing Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
magnetometer Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
mathml Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
media Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
media-capabilities Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
media-source Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
mediacapture-fromelement Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
mediacapture-record Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
mediacapture-streams Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
mediasession Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
microdata Update web-platform-tests to revision 4bba821de44da9ed47c2562f995a0da6eecc177b 2015-10-12 17:53:50 +02:00
mixed-content Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0 2016-09-09 16:17:14 +02:00
navigation-timing Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
notifications Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
offscreen-canvas Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
old-tests Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
orientation-event Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
page-visibility Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
payment-request Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
performance-timeline Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
pointerevents Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
pointerlock Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
preload Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
presentation-api Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
progress-events Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
proximity Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
quirks-mode Run a test per property and value in unitless-length.html 2017-04-26 17:30:29 +02:00
referrer-policy Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
remote-playback Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
resource-timing Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
resources Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
screen-orientation Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
secure-contexts Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
selection Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
selectors Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
selectors-api/tests/submissions/Opera Update web-platform-tests to revision 12d3e15e5ecae695e1216c358d613705fbff6b68 2015-07-27 16:31:27 +02:00
service-workers Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
shadow-dom Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
staticrange Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
storage Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
streams Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
subresource-integrity Update web-platform-tests to revision 346d5b51a122f7bb1c7747064499ef281a0200f7 2016-06-24 11:36:34 +02:00
svg Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
svg-aam Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
tools Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
touch-events Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
uievents Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
upgrade-insecure-requests Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e 2016-12-28 11:34:21 +01:00
url Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
user-timing Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
vibration Update web-platform-tests to 5582e4d2bfcfd1fa9f105406b143170ee2af7db1 2016-04-01 13:38:57 +02:00
wai-aria Update web-platform-tests to revision dc5cbf088edcdb266541d4e5a76149a2c6e716a0 2016-09-09 16:17:14 +02:00
web-animations Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
web-nfc Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webaudio Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
webauthn Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
WebCryptoAPI Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webdriver Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webgl Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
WebIDL Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webmessaging Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webrtc Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
websockets Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webstorage Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webusb Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webvr Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
webvtt Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
workers Added exception-handling to worker wpt tests. 2017-06-22 11:28:58 -05:00
XMLHttpRequest Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
.gitignore Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
.gitmodules Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
.travis.yml Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
check_stability.py Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
ci_built_diff.sh Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00
ci_lint.sh Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
ci_stability.sh Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534 2017-02-20 13:52:41 +01:00
config.default.json Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
CONTRIBUTING.md Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
LICENSE
LICENSE.md Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
lint Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
lint.whitelist Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
manifest
README.md Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444 2017-04-22 14:17:10 +02:00
serve
serve.py Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d 2016-11-15 09:35:34 +01:00
server-side.md
update-built-tests.sh Update web-platform-tests and CSS tests. 2017-02-06 22:38:29 +01:00

The web-platform-tests Project IRC chat

The web-platform-tests Project is a W3C-coordinated attempt to build a cross-browser testsuite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

Running the Tests

The tests are designed to be run from your local computer. The test environment requires Python 2.7+ (but not Python 3.x). You will also need a copy of OpenSSL.

On Windows, be sure to add the Python directory (c:\python2x, by default) to your %Path% Environment Variable, and read the Windows Notes section below.

To get the tests running, you need to set up the test domains in your hosts file. The following entries are required:

127.0.0.1   web-platform.test
127.0.0.1   www.web-platform.test
127.0.0.1   www1.web-platform.test
127.0.0.1   www2.web-platform.test
127.0.0.1   xn--n8j6ds53lwwkrqhv28a.web-platform.test
127.0.0.1   xn--lve-6lad.web-platform.test
0.0.0.0     nonexistent-origin.web-platform.test

If you are behind a proxy, you also need to make sure the domains above are excluded from your proxy lookups.

Because web-platform-tests uses git submodules, you must ensure that these are up to date. In the root of your checkout, run:

git submodule update --init --recursive

The test environment can then be started using

./serve

This will start HTTP servers on two ports and a websockets server on one port. By default one web server starts on port 8000 and the other ports are randomly-chosen free ports. Tests must be loaded from the first HTTP server in the output. To change the ports, copy the config.default.json file to config.json and edit the new file, replacing the part that reads:

"http": [8000, "auto"]

to some port of your choice e.g.

"http": [1234, "auto"]

If you installed OpenSSL in such a way that running openssl at a command line doesn't work, you also need to adjust the path to the OpenSSL binary. This can be done by adding a section to config.json like:

"ssl": {"openssl": {"binary": "/path/to/openssl"}}

Windows Notes

Running wptserve with SSL enabled on Windows typically requires installing an OpenSSL distribution. Shining Light provide a convenient installer that is known to work, but requires a little extra setup, i.e.:

Run the installer for Win32_OpenSSL_v1.1.0b (30MB). During installation, change the default location for where to Copy OpenSSL Dlls from the System directory to the /bin directory.

After installation, ensure that the path to OpenSSL (typically, this will be C:\OpenSSL-Win32\bin) is in your %Path% Environment Variable. If you forget to do this part, you will most likely see a 'File Not Found' error when you start wptserve.

Finally, set the path value in the server configuration file to the default OpenSSL configuration file location. To do this, copy config.default.json in the web-platform-tests root to config.json. Then edit the JSON so that the key ssl/openssl/base_conf_path has a value that is the path to the OpenSSL config file (typically this will be C:\\OpenSSL-Win32\\bin\\openssl.cfg).

Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wptserve.

Publication

The master branch is automatically synced to http://w3c-test.org/.

Pull requests are automatically mirrored except those that modify sensitive resources (such as .py). The latter require someone with merge access to comment with "LGTM" or "w3c-test:mirror" to indicate the pull request has been checked.

Finding Things

Each top-level directory matches the shortname used by a standard, with some exceptions. (Typically the shortname is from the standard's corresponding GitHub repository.)

For some of the specifications, the tree under the top-level directory represents the sections of the respective documents, using the section IDs for directory names, with a maximum of three levels deep.

So if you're looking for tests in HTML for "The History interface", they will be under html/browsers/history/the-history-interface/.

Various resources that tests depend on are in common, images, and fonts.

Branches

In the vast majority of cases the only upstream branch that you should need to care about is master. If you see other branches in the repository, you can generally safely ignore them.

Contributing

Save the Web, Write Some Tests!

Absolutely everyone is welcome (and even encouraged) to contribute to test development, so long as you fulfill the contribution requirements detailed in the Contributing Guidelines. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.

The way to contribute is just as usual:

  • Fork this repository (and make sure you're still relatively in sync with it if you forked a while ago).
  • Create a branch for your changes: git checkout -b topic.
  • Make your changes.
  • Run the lint script described below.
  • Commit locally and push that to your repo.
  • Send in a pull request based on the above.

Issues with web-platform-tests

If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!

Lint tool

We have a lint tool for catching common mistakes in test files. You can run it manually by starting the lint executable from the root of your local web-platform-tests working directory like this:

./lint

The lint tool is also run automatically for every submitted pull request, and reviewers will not merge branches with tests that have lint errors, so you must fix any errors the lint tool reports. For details on doing that, see the lint-tool documentation.

But in the unusual case of error reports for things essential to a certain test or that for other exceptional reasons shouldn't prevent a merge of a test, update and commit the lint.whitelist file in the web-platform-tests root directory to suppress the error reports. For details on doing that, see the lint-tool documentation.

Adding command-line scripts ("tools" subdirs)

Sometimes you may want to add a script to the repository that's meant to be used from the command line, not from a browser (e.g., a script for generating test files). If you want to ensure (e.g., for security reasons) that such scripts won't be handled by the HTTP server, but will instead only be usable from the command line, then place them in either:

  • the tools subdir at the root of the repository, or

  • the tools subdir at the root of any top-level directory in the repository which contains the tests the script is meant to be used with

Any files in those tools directories won't be handled by the HTTP server; instead the server will return a 404 if a user navigates to the URL for a file within them.

If you want to add a script for use with a particular set of tests but there isn't yet any tools subdir at the root of a top-level directory in the repository containing those tests, you can create a tools subdir at the root of that top-level directory and place your scripts there.

For example, if you wanted to add a script for use with tests in the notifications directory, create the notifications/tools subdir and put your script there.

Test Review

We can sometimes take a little while to go through pull requests because we have to go through all the tests and ensure that they match the specification correctly. But we look at all of them, and take everything that we can.

OWNERS files are used only to indicate who should be notified of pull requests. If you are interested in receiving notifications of proposed changes to tests in a given directory, feel free to add yourself to the OWNERS file. Anyone with expertise in the specification under test can approve a pull request. In particular, if a test change has already been adequately reviewed "upstream" in another repository, it can be pushed here without any further review by supplying a link to the upstream review.

Getting Involved

If you wish to contribute actively, you're very welcome to join the public-test-infra@w3.org mailing list (low traffic) by signing up to our mailing list. The mailing list is archived.

Join us on irc #testing (irc.w3.org, port 6665). The channel is archived.

Documentation