servo/tests/wpt/web-platform-tests
2019-01-24 23:13:56 -05:00
..
.well-known Update web-platform-tests to revision a8fb1792cbfab3ed59401775da76fb6c15d9f2e2 2018-11-23 15:48:00 -05:00
2dcontext Update web-platform-tests to revision e2ac2e7d7539c4eb9963b7f23dbb3f7692fce537 2019-01-09 22:24:54 -05:00
accelerometer Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
accname Update web-platform-tests to revision 2df7f9ff620cbdaa2928464892fb1dfb880fd6c6 2018-09-28 22:54:30 -04:00
acid
ambient-light Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
animation-worklet Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
annotation-model
annotation-protocol
annotation-vocab Update web-platform-tests to revision b704e37ec97fe90b3a3d59c10f78c21907b5b576 2018-10-30 23:10:39 -04:00
apng
appmanifest
audio-output Update web-platform-tests to revision 1abcb7058ecdaabd5fe9c27c90a73795d31d2a0a 2018-12-03 22:19:20 -05:00
background-fetch Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
BackgroundSync
battery-status
beacon Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8 2018-10-25 23:09:38 -04:00
bluetooth Update web-platform-tests to revision 74bae78af4b95a2f0ca3a81df9c7fe3143f24bbc 2019-01-17 22:34:16 -05:00
clear-site-data
client-hints Update web-platform-tests to revision 077bb422b7bb21491a414e334bc594d83ca9e55b 2018-10-16 22:45:55 -04:00
clipboard-apis Update web-platform-tests to revision bf71b1f245ce34e447b7bde8ed46694574a63da7 2019-01-19 22:33:07 -05:00
common Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
compat Update web-platform-tests to revision ef625c6ac28d0ac07ef0c62a6f22c10d14a2623a 2019-01-23 23:13:15 -05:00
conformance-checkers Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
console
content-security-policy Update web-platform-tests to revision 2d42384cf21efd71843295d319c1bab85b3acf4a 2019-01-11 22:07:24 -05:00
cookie-store Update web-platform-tests to revision 4e6563687b9c03d2f54ce0f06ef0ccc8e0964328 2019-01-02 22:45:11 -05:00
cookies Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
core-aam
cors Update web-platform-tests to revision a8fb1792cbfab3ed59401775da76fb6c15d9f2e2 2018-11-23 15:48:00 -05:00
credential-management
css Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
custom-elements Update web-platform-tests to revision b7d6508023db961126208844668236647169fe49 2019-01-06 23:28:19 -05:00
device-memory
docs Update web-platform-tests to revision 74bae78af4b95a2f0ca3a81df9c7fe3143f24bbc 2019-01-17 22:34:16 -05:00
dom Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
domparsing Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8 2018-10-25 23:09:38 -04:00
domxpath
dpub-aam
dpub-aria
editing Update web-platform-tests to revision ade06500869396f7a46b95bc3553af4ca9c07f31 2018-10-17 22:57:41 -04:00
encoding Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
encrypted-media Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
entries-api Update web-platform-tests to revision 6856483bcc86322198f10e0c42385a7f9127eb66 2018-11-14 22:29:47 -05:00
event-timing Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
eventsource Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
feature-policy Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
fetch Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
FileAPI Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
fonts Update web-platform-tests to revision 71e901cf4534417abfabe4d77a317817f5cc09db 2019-01-03 21:56:54 -05:00
fullscreen Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
gamepad
generic-sensor Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8 2018-10-25 23:09:38 -04:00
geolocation-API Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
geolocation-sensor Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
graphics-aam
gyroscope Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
hr-time Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
html Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
html-longdesc
html-media-capture
idle-detection Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
imagebitmap-renderingcontext
images
IndexedDB Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
inert
infrastructure Update web-platform-tests to revision 74bae78af4b95a2f0ca3a81df9c7fe3143f24bbc 2019-01-17 22:34:16 -05:00
input-device-capabilities
input-events Update web-platform-tests to revision 4adce83d1f2b08fa2e92427c4687d0cf535aee53 2019-01-08 22:40:05 -05:00
interfaces Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
intersection-observer Update web-platform-tests to revision de9a09ab7f605aed6a4b53ed96427412bab76463 2018-12-01 22:55:47 -05:00
js
keyboard-lock
keyboard-map
kv-storage Update web-platform-tests to revision bf71b1f245ce34e447b7bde8ed46694574a63da7 2019-01-19 22:33:07 -05:00
lifecycle
loading Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
longtask-timing Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
magnetometer Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
mathml Update web-platform-tests to revision 2ade7dc478df87727880d849a76ee4b5be058f63 2019-01-16 22:36:41 -05:00
media
media-capabilities Update web-platform-tests to revision de9a09ab7f605aed6a4b53ed96427412bab76463 2018-12-01 22:55:47 -05:00
media-source Update web-platform-tests to revision 4052654d786236b493d2df3cb80b9d3d1d0a8354 2018-12-12 22:53:27 -05:00
mediacapture-depth Update web-platform-tests to revision 71e901cf4534417abfabe4d77a317817f5cc09db 2019-01-03 21:56:54 -05:00
mediacapture-fromelement Update web-platform-tests to revision 4984b190341b535c645729b8f99247aace0022fe 2018-12-17 22:27:33 -05:00
mediacapture-image Update web-platform-tests to revision 50ff4f970fd8592a9f436d4e86e7d572de143260 2018-09-20 22:44:37 -04:00
mediacapture-record Update web-platform-tests to revision 0f31ab1b094596062154092307bb9ff8e6122533 2019-01-15 22:08:50 -05:00
mediacapture-streams Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
mediasession
mimesniff Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
mixed-content Update web-platform-tests to revision bf71b1f245ce34e447b7bde8ed46694574a63da7 2019-01-19 22:33:07 -05:00
mst-content-hint
navigation-timing Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
netinfo
network-error-logging Update web-platform-tests to revision a8fb1792cbfab3ed59401775da76fb6c15d9f2e2 2018-11-23 15:48:00 -05:00
notifications
offscreen-canvas
old-tests
orientation-event Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
orientation-sensor Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8 2018-10-25 23:09:38 -04:00
origin-policy Update web-platform-tests to revision 6b6163867ad474d977778a3f19c378a05a4851dc 2019-01-04 22:38:27 -05:00
page-visibility
paint-timing Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
payment-handler Update web-platform-tests to revision fb15e14b52049f952612623ee0d7fb7a620a57c9 2018-11-01 23:02:46 -04:00
payment-method-basic-card Update web-platform-tests to revision fb15e14b52049f952612623ee0d7fb7a620a57c9 2018-11-01 23:02:46 -04:00
payment-method-id Update web-platform-tests to revision 36634cbcf3253dfe8d220990a27ad4eeebf8ec2f 2018-09-27 23:48:13 -04:00
payment-request Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
performance-timeline Update web-platform-tests to revision 4052654d786236b493d2df3cb80b9d3d1d0a8354 2018-12-12 22:53:27 -05:00
permissions Update web-platform-tests to revision c2b30ef30749b6a8f2cc832761dfe011e63d5e94 2018-10-05 23:00:35 -04:00
picture-in-picture Update web-platform-tests to revision 4052654d786236b493d2df3cb80b9d3d1d0a8354 2018-12-12 22:53:27 -05:00
pointerevents Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
pointerlock Update web-platform-tests to revision 615bb572c95add74ca4fb9fed4af5269a49cf4ef 2018-11-06 22:43:16 -05:00
portals Update web-platform-tests to revision bf71b1f245ce34e447b7bde8ed46694574a63da7 2019-01-19 22:33:07 -05:00
preload Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
presentation-api Update web-platform-tests to revision 615bb572c95add74ca4fb9fed4af5269a49cf4ef 2018-11-06 22:43:16 -05:00
priority-hints
proximity
push-api
quirks Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
referrer-policy Update web-platform-tests to revision bf71b1f245ce34e447b7bde8ed46694574a63da7 2019-01-19 22:33:07 -05:00
remote-playback
reporting
requestidlecallback Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
resize-observer
resource-timing Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
resources Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
screen-capture Update web-platform-tests to revision 4dbc8a0d7b1b1c032aaddc2579ec7239ad565127 2018-12-31 13:28:17 -05:00
screen-orientation
scroll-animations Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
secure-contexts
selection Update web-platform-tests to revision 6856483bcc86322198f10e0c42385a7f9127eb66 2018-11-14 22:29:47 -05:00
server-timing Update web-platform-tests to revision c583bcd7eb30f38cb2d673031cde245776f1da5a 2018-11-02 22:59:27 -04:00
service-workers Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
shadow-dom Update web-platform-tests to revision e2ac2e7d7539c4eb9963b7f23dbb3f7692fce537 2019-01-09 22:24:54 -05:00
shape-detection
signed-exchange Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
speech-api Update web-platform-tests to revision de9a09ab7f605aed6a4b53ed96427412bab76463 2018-12-01 22:55:47 -05:00
storage Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
streams Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
subresource-integrity Update web-platform-tests to revision b704e37ec97fe90b3a3d59c10f78c21907b5b576 2018-10-30 23:10:39 -04:00
svg Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
svg-aam
tools Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
touch-events
trusted-types Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
uievents Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f 2018-11-27 23:18:10 -05:00
upgrade-insecure-requests Update web-platform-tests to revision 2d42384cf21efd71843295d319c1bab85b3acf4a 2019-01-11 22:07:24 -05:00
url Remove leading question mark when constructing URLSearchParams 2018-12-25 12:23:05 +08:00
user-timing Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
vibration
visual-viewport
wai-aria Update web-platform-tests to revision 7c50c216081d6ea3c9afe553ee7b64534020a1b2 2018-09-04 23:07:46 -04:00
wake-lock Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
wasm Update web-platform-tests to revision 6087baf4a83e7953112242be9fd6e719797ebdf6 2018-12-07 22:08:08 -05:00
web-animations Update web-platform-tests to revision 192193581b6912818a0e3f2408f40f033a451a79 2019-01-14 22:19:47 -05:00
web-locks Update web-platform-tests to revision ef625c6ac28d0ac07ef0c62a6f22c10d14a2623a 2019-01-23 23:13:15 -05:00
web-nfc Update web-platform-tests to revision d8b8e0b8efe993a37404d6c6fc75e16fdc16b7d8 2018-10-25 23:09:38 -04:00
web-share Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
webaudio Update web-platform-tests to revision 2ade7dc478df87727880d849a76ee4b5be058f63 2019-01-16 22:36:41 -05:00
webauthn Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
WebCryptoAPI Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
webdriver Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
webgl
WebIDL Update web-platform-tests to revision c583bcd7eb30f38cb2d673031cde245776f1da5a 2018-11-02 22:59:27 -04:00
webmessaging Update web-platform-tests to revision c583bcd7eb30f38cb2d673031cde245776f1da5a 2018-11-02 22:59:27 -04:00
webmidi Update web-platform-tests to revision 2b758296541cf4f2209b8c2352cf6c7890c97be3 2018-10-22 22:54:03 -04:00
webrtc Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
webrtc-identity Update web-platform-tests to revision 615bb572c95add74ca4fb9fed4af5269a49cf4ef 2018-11-06 22:43:16 -05:00
webrtc-quic Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
webrtc-stats Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
websockets Update web-platform-tests to revision a8fb1792cbfab3ed59401775da76fb6c15d9f2e2 2018-11-23 15:48:00 -05:00
webstorage Update web-platform-tests to revision ba4ca501a5ebdee8cbfc006bf9e7e44231b188d1 2018-10-06 23:25:22 -04:00
webusb Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
webvr Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
webvtt Update web-platform-tests to revision cd44958a002b1ad494168e0290554644de84526e 2018-11-07 22:27:51 -05:00
webxr Update web-platform-tests to revision 192193581b6912818a0e3f2408f40f033a451a79 2019-01-14 22:19:47 -05:00
workers Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472 2019-01-18 22:11:13 -05:00
worklets Update web-platform-tests to revision 2d42384cf21efd71843295d319c1bab85b3acf4a 2019-01-11 22:07:24 -05:00
x-frame-options Update web-platform-tests to revision 50ff4f970fd8592a9f436d4e86e7d572de143260 2018-09-20 22:44:37 -04:00
xhr Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
.azure-pipelines.yml Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
.codecov.yml
.gitignore Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
.gitmodules
.pyup.yml Update web-platform-tests to revision 615bb572c95add74ca4fb9fed4af5269a49cf4ef 2018-11-06 22:43:16 -05:00
.taskcluster.yml Update web-platform-tests to revision 388ba3a049a3473b1945b9f8f81e9d6e342a249e 2019-01-24 23:13:56 -05:00
.travis.yml Update web-platform-tests to revision e7517084404fca126c4f89eb69217206689adf17 2018-12-22 22:32:34 -05:00
check_stability.ini Update web-platform-tests to revision 912d5081b62d6e6a2f847935c82722e31cca7a1f 2018-12-10 23:19:57 -05:00
CODEOWNERS
CONTRIBUTING.md
LICENSE
LICENSE.md
lint.whitelist Update web-platform-tests to revision bd951736b4d7dbfd862dfa0f27271b544e35ca30 2019-01-23 17:10:13 -05:00
README.md Update web-platform-tests to revision 2df7f9ff620cbdaa2928464892fb1dfb880fd6c6 2018-09-28 22:54:30 -04:00
serve.py
server-side.md
testharness_runner.html
update-built-tests.sh
wpt
wpt.py

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.

Setting Up the Repo

Clone or otherwise get https://github.com/web-platform-tests/wpt.

Note: because of the frequent creation and deletion of branches in this repo, it is recommended to "prune" stale branches when fetching updates, i.e. use git pull --prune (or git fetch -p && git merge).

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).

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 necessary content can be generated with ./wpt make-hosts-file; on Windows, you will need to precede the prior command with python or the path to the Python binary (python wpt make-hosts-file).

For example, on most UNIX-like systems, you can setup the hosts file with:

./wpt make-hosts-file | sudo tee -a /etc/hosts

And on Windows (this must be run in a PowerShell session with Administrator privileges):

python wpt make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append

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

Running Tests Manually

The test server can be started using

./wpt serve

On Windows: You will need to precede the prior command with python or the path to the python binary.

python wpt serve

This will start HTTP servers on two ports and a websockets server on one port. By default the web servers start on ports 8000 and 8443 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, create a config.json file in the wpt root directory, and add port definitions of your choice e.g.:

{
  "ports": {
    "http": [1234, "auto"],
    "https":[5678]
  }
}

After your hosts file is configured, the servers will be locally accessible at:

http://web-platform.test:8000/
https://web-platform.test:8443/ *

*See Trusting Root CA

Running Tests Automatically

Tests can be run automatically in a browser using the run command of the wpt script in the root of the checkout. This requires the hosts file setup documented above, but you must not have the test server already running when calling wpt run. The basic command line syntax is:

./wpt run product [tests]

On Windows: You will need to precede the prior command with python or the path to the python binary.

python wpt run product [tests]

where product is currently firefox or chrome and [tests] is a list of paths to tests. This will attempt to automatically locate a browser instance and install required dependencies. The command is very configurable; for example to specify a particular binary use wpt run --binary=path product. The full range of options can be see with wpt run --help and wpt run --wptrunner-help.

Not all dependencies can be automatically installed; in particular the certutil tool required to run https tests with Firefox must be installed using a system package manager or similar.

On Debian/Ubuntu certutil may be installed using:

sudo apt install libnss3-tools

And on macOS with homebrew using:

brew install nss

On other platforms, download the firefox archive and common.tests.tar.gz archive for your platform from Mozilla CI.

Then extract certutil[.exe] from the tests.tar.gz package and libnss3[.so|.dll|.dynlib] and put the former on your path and the latter on your library path.

Command Line Tools

The wpt command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:

  • wpt serve - For starting the wpt http server
  • wpt run - For running tests in a browser
  • wpt lint - For running the lint against all tests
  • wpt manifest - For updating or generating a MANIFEST.json test manifest
  • wpt install - For installing the latest release of a browser or webdriver server on the local machine.

Submodules

Some optional components of web-platform-tests (test components from third party software and pieces of the CSS build system) are included as submodules. To obtain these components run the following in the root of your checkout:

git submodule update --init --recursive

Prior to commit 39d07eb01fab607ab1ffd092051cded1bdd64d78 submodules were required for basic functionality. If you are working with an older checkout, the above command is required in all cases.

When moving between a commit prior to 39d07eb and one after it git may complain

$ git checkout master
error: The following untracked working tree files would be overwritten by checkout:
[…]

...followed by a long list of files. To avoid this error, remove the resources and tools directories before switching branches:

$ rm -r resources/ tools/
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'

When moving in the opposite direction, i.e. to a commit that does have submodules, you will need to git submodule update, as above. If git throws an error like:

fatal: No url found for submodule path 'resources/webidl2/test/widlproc' in .gitmodules
Failed to recurse into submodule path 'resources/webidl2'
fatal: No url found for submodule path 'tools/html5lib' in .gitmodules
Failed to recurse into submodule path 'resources'
Failed to recurse into submodule path 'tools'

...then remove the tools and resources directories, as above.

Windows Notes

On Windows wpt commands must be prefixed with python or the path to the python binary (if python is not in your %PATH%).

python wpt [command]

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 wpt commands.

Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false in your working tree.

Certificates

By default pre-generated certificates for the web-platform.test domain are provided in tools/certs. If you wish to generate new certificates for any reason it's possible to use OpenSSL when starting the server, or starting a test run, by providing the --ssl-type=openssl argument to the wpt serve or wpt run commands.

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"}}

On Windows using OpenSSL 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 create a file called config.json. Then add the OpenSSL configuration below, ensuring 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):

{
  "ssl": {
    "type": "openssl",
    "encrypt_after_connect": false,
    "openssl": {
      "openssl_binary": "openssl",
      "base_path: "_certs",
      "force_regenerate": false,
      "base_conf_path": "C:\\OpenSSL-Win32\\bin\\openssl.cfg"
    },
  },
}

Trusting Root CA

To prevent browser SSL warnings when running HTTPS tests locally, the web-platform-tests Root CA file cacert.pem in tools/certs must be added as a trusted certificate in your OS/browser.

NOTE: The CA should not be installed in any browser profile used outside of tests, since it may be used to generate fake certificates. For browsers that use the OS certificate store, tests should therefore not be run manually outside a dedicated OS instance (e.g. a VM). To avoid this problem when running tests in Chrome or Firefox use wpt run, which disables certificate checks and therefore doesn't require the root CA to be trusted.

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:

./wpt 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.

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 more details, 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.

META.yml 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 META.yml 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.

Search filters to find things to 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