gecko-dev/testing/web-platform/tests
Andreea Pavel d6f3c89545 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-04-26 09:08:26 +03:00
..
.well-known
2dcontext Bug 1445300 [wpt PR 10000] - Add tests for transferring ImageBitmap objects., a=testonly 2018-04-20 21:59:53 +01:00
BackgroundSync Bug 1452643 [wpt PR 9751] - Update the BackgroundSync IDL file, a=testonly 2018-04-15 09:31:57 +01:00
FileAPI Bug 1436388 [wpt PR 9353] - [Mojo Blob URLs] Resolve navigation blob URLs in blink., a=testonly 2018-04-15 09:27:09 +01:00
IndexedDB Bug 1448493 [wpt PR 10163] - Fix some IDL tests after html.idl includes SVGElement, a=testonly 2018-04-15 08:35:44 +01:00
WebCryptoAPI Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
WebIDL Bug 1441399 [wpt PR 8796] - [WebIDL] Add tests for iterator objects and prototypes, a=testonly 2018-03-31 22:26:07 +01:00
accelerometer Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
accname Bug 1453414 [wpt PR 10433] - accname: Updated tests, a=testonly 2018-04-20 22:00:05 +01:00
acid Bug 1439170 - Add a long timeout to acid 3 test, r=gsnedders 2018-02-26 11:22:50 +00:00
ambient-light Bug 1446275 [wpt PR 10068] - Revert "rename generic-sensor directory as sensors", a=testonly 2018-04-15 08:34:19 +01:00
annotation-model Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
annotation-protocol Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
annotation-vocab Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
apng Bug 1444382 [wpt PR 9943] - [PE] Add "image/apng" to supported image MIME types, a=testonly 2018-03-31 22:33:50 +01:00
audio-output
background-fetch Bug 1452643 [wpt PR 9751] - Update the BackgroundSync IDL file, a=testonly 2018-04-15 09:31:57 +01:00
battery-status
beacon Bug 1439298 [wpt PR 9569] - Fix wpt/beacon/headers/header-content-type.html slowness, a=testonly 2018-03-31 22:23:05 +01:00
bluetooth Bug 1447862 [wpt PR 10130] - Make BlueTooth/USB requestDevice non-consuming., a=testonly 2018-04-15 09:37:06 +01:00
budget-api Bug 1452643 [wpt PR 9763] - Update the budget-api IDL file, a=testonly 2018-04-15 09:32:10 +01:00
clear-site-data
client-hints Bug 1452811 [wpt PR 10352] - Add external WPT test for cross-origin requests, a=testonly 2018-04-20 21:58:54 +01:00
clipboard-apis Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
common Bug 1446130 [wpt PR 10054] - [css-layout-api] Allow LayoutChild(ren) to be laid out., a=testonly 2018-04-15 08:36:01 +01:00
compat Bug 1453683 [wpt PR 10447] - Fix regression allowing text value for -webkit-background-origin, a=testonly 2018-04-24 12:22:29 +00:00
conformance-checkers Bug 1448295 [wpt PR 10155] - cc Update messages.json, a=testonly 2018-04-15 08:35:22 +01:00
console Bug 1437737 [wpt PR 9008] - Add format-specifier-applied-to-Symbol console tests, a=testonly 2018-03-31 22:20:30 +01:00
content-security-policy Bug 1454091 [wpt PR 10467] - Reland 2: Use PostTask to schedule cross-process postMessage forwarding., a=testonly 2018-04-24 12:22:45 +00:00
cookie-store Bug 1452323 [wpt PR 10349] - Cookie Store: Tentatively deflake special names test, a=testonly 2018-04-15 09:37:56 +01:00
cookies Bug 1438937 [wpt PR 8583] - Add http-state cookie tests from abart/http-state github repository, a=testonly 2018-04-15 08:29:23 +01:00
core-aam Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
cors Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
credential-management Bug 1430947 - Add [SecureContext] to navigator.credentials r=bz 2018-01-16 19:11:44 -07:00
css Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-04-26 09:08:26 +03:00
custom-elements Bug 1450754 [wpt PR 10272] - Fix customElements.upgrade() tests for <template>, a=testonly 2018-04-15 09:25:14 +01:00
device-memory Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
docs Bug 1454368 [wpt PR 10403] - Added note about using special keys in send_keys to testdriver docs, a=testonly 2018-04-20 21:59:18 +01:00
dom Bug 1454386 [wpt PR 9987] - Ensure cloneNode() does not preserve the prototype, a=testonly 2018-04-24 12:22:51 +00:00
domparsing Bug 1438833: fix web platform tests for XMLSerializer r=bz 2018-02-16 19:32:37 +05:30
domxpath Bug 1446138 [wpt PR 10055] - Add tentative test for what ".." on documentElement returns, a=testonly 2018-04-15 08:33:09 +01:00
dpub-aam
dpub-aria
editing Bug 1422234 - part 2: Add wpt-tests to check if insertParagraph command splits or doesn't split inline elements at their edge r=m_kato 2018-01-23 18:42:49 +09:00
encoding Bug 1452643 [wpt PR 9780] - Update the encoding IDL file, a=testonly 2018-04-15 08:30:59 +01:00
encrypted-media Bug 1454380 [wpt PR 8508] - Test that requestMediaKeySystemAccess sets label, a=testonly 2018-04-24 12:22:44 +00:00
entries-api Bug 1445378 [wpt PR 10003] - README file for entries-api, a=testonly 2018-04-15 08:32:01 +01:00
eventsource Bug 1445740 - Port EventSource in Web Workers to WorkerRef, r=smaug 2018-03-15 23:05:17 +01:00
feature-policy Bug 1446406 [wpt PR 10076] - Allow feature policy to be used in opaque origins., a=testonly 2018-04-24 12:22:37 +00:00
fetch Bug 1453382 [wpt PR 10421] - Fetch: align about:blank handling with the standard, a=testonly 2018-04-24 12:22:52 +00:00
fonts Bug 1446321 [wpt PR 9993] - MathML: Test italic correction of sub and super scripts attached to a large operator, a=testonly 2018-04-15 08:35:05 +01:00
fullscreen Bug 1440612 [wpt PR 9299] - Update move-to-fullscreen-iframe-manual.html to match the spec, a=testonly 2018-03-31 22:25:54 +01:00
gamepad Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
generic-sensor Bug 1446275 [wpt PR 10068] - Revert "rename generic-sensor directory as sensors", a=testonly 2018-04-15 08:34:19 +01:00
geolocation-API
geolocation-sensor Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
graphics-aam Bug 1435337 - Update web-platform-tests to revision 7174d3e89f3057aae399483194dc4b608ee8c933, a=testonly 2018-02-02 19:09:23 +00:00
gyroscope Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
hr-time Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
html Bug 1453248 [wpt PR 10411] - Return null from contentDocument/getSVGDocument() for cross-origin documents., a=testonly 2018-04-24 12:22:26 +00:00
html-imports
html-longdesc
html-media-capture
http Bug 1443594 [wpt PR 9882] - bluetooth: web: test: Move test to wpt/bluetooth/, a=testonly 2018-03-31 22:31:31 +01:00
imagebitmap-renderingcontext
images Bug 1450304 [wpt PR 10254] - Make CORB MIME type classification consistent with the web specs., a=testonly 2018-04-15 09:25:06 +01:00
infrastructure Bug 1447415 [wpt PR 10113] - Automated Keyboard Input, a=testonly 2018-04-15 09:26:48 +01:00
innerText Bug 1453789: Remove Element.createShadowRoot. r=smaug 2018-04-13 20:51:55 +02:00
input-events
interfaces Merge inbound to mozilla-central. a=merge 2018-04-25 00:50:59 +03:00
intersection-observer Bug 1452310 [wpt PR 9199] - Add intersection-observer/OWNERS, a=testonly 2018-04-15 09:36:02 +01:00
js
keyboard-lock Bug 1453039 [wpt PR 10400] - [KeyboardLock] Updating API to reject the first promise if lock is called twice, a=testonly 2018-04-20 21:59:28 +01:00
longtask-timing Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
magnetometer Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
mathml Bug 1446321 [wpt PR 9993] - MathML: Test italic correction of sub and super scripts attached to a large operator, a=testonly 2018-04-15 08:35:05 +01:00
media Bug 1438049 [wpt PR 9504] - Add 1x1-green.png to WPT media., a=testonly 2018-03-31 22:25:28 +01:00
media-capabilities Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
media-source Bug 1435868 - Update web-platform-tests to revision 1e5122139897bc70789527960120354b8c640ef0, a=testonly 2018-02-05 22:20:58 +00:00
mediacapture-fromelement Bug 1421370 - Update web-platform-tests to revision 2b50389ee72d89dd0be12bc6ca54a6e95c98d163, a=testonly 2017-11-28 21:32:30 +00:00
mediacapture-image
mediacapture-record Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
mediacapture-streams Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
mediasession Bug 1451257 [wpt PR 10303] - Simplify assert_throws in two places where error messages were passed, a=testonly 2018-04-15 09:27:48 +01:00
mimesniff Bug 1450945 [wpt PR 10279] - New MIME type parsing tests, a=testonly 2018-04-15 09:28:03 +01:00
mixed-content Bug 1445184 [wpt PR 9992] - [Beacon API] Port beacon-cross-origin.https.html to wpt, a=testonly 2018-04-15 08:32:04 +01:00
navigation-timing Bug 1451904 [wpt PR 10339] - Fix the |name| of PerformanceNavigationTiming, a=testonly 2018-04-15 09:37:13 +01:00
netinfo Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
notifications Bug 1441845 [wpt PR 9713] - Remove the "sound" property from the Notification interface, a=testonly 2018-03-31 22:28:22 +01:00
offscreen-canvas Bug 1446093 [wpt PR 10051] - Improve wpt testing on OffscreenCanvas convertToBlob, a=testonly 2018-04-15 08:33:40 +01:00
old-tests/submission Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
orientation-event
orientation-sensor Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
page-visibility
paint-timing Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
payment-handler Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
payment-method-basic-card
payment-method-id
payment-request Bug 1454335 [wpt PR 10485] - fix: ApplePay PMI is wrong, a=testonly 2018-04-24 12:22:53 +00:00
performance-timeline Bug 1438858 [wpt PR 9559] - Moved and .name return the address of the document, a=testonly 2018-03-31 22:25:15 +01:00
picture-in-picture Bug 1436447 [wpt PR 9370] - [Picture-in-Picture] Add PictureInPictureWindow width and height stubs, a=testonly 2018-03-31 22:20:34 +01:00
pointerevents Bug 1453792 [wpt PR 10454] - Make PointerEvent fromElement/toElement return null., a=testonly 2018-04-24 12:22:43 +00:00
pointerlock Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
preload Bug 1443763 [wpt PR 9897] - Fix font paths after #9718, a=testonly 2018-04-15 08:32:37 +01:00
presentation-api Bug 1452251 [wpt PR 9966] - [presentation-api] check if a URL with an unsupported scheme is ignored, a=testonly 2018-04-15 08:33:11 +01:00
proximity Bug 1446275 [wpt PR 10068] - Revert "rename generic-sensor directory as sensors", a=testonly 2018-04-15 08:34:19 +01:00
quirks Bug 1435337 - Update web-platform-tests to revision 7174d3e89f3057aae399483194dc4b608ee8c933, a=testonly 2018-02-02 19:09:23 +00:00
referrer-policy Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
remote-playback Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
requestidlecallback Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
resize-observer Bug 1453789: Remove Element.createShadowRoot. r=smaug 2018-04-13 20:51:55 +02:00
resource-timing Bug 1447233 [wpt PR 10105] - Move remaining Intel/resource-timing/ tests to WPT, a=testonly 2018-04-15 08:34:50 +01:00
resources Bug 1452874 [wpt PR 10393] - Fix #10388: Make resources/test use the upstream config, a=testonly 2018-04-20 21:58:58 +01:00
screen-orientation Bug 1441094 [wpt PR 9291] - Optimize lock-bad-argument.html, a=testonly 2018-03-31 22:26:46 +01:00
secure-contexts Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
selection Bug 1443513 [wpt PR 9024] - Fix Selection API idlharness.js test, a=testonly 2018-03-31 22:30:11 +01:00
server-timing Bug 1451202 [wpt PR 10302] - Fix Server-Timing tests for Webkit, a=testonly 2018-04-15 09:28:55 +01:00
service-workers Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-25 00:57:49 +03:00
shadow-dom Bug 1448791 [wpt PR 10174] - Keep track of all pending slot assignments, and recalc all before UpdateStyle phase, a=testonly 2018-04-15 08:36:35 +01:00
speech-api Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
storage Bug 1443718 [wpt PR 9892] - Consolidate all IDL files into interfaces/, a=testonly 2018-03-31 22:32:37 +01:00
streams Bug 1450905 [wpt PR 10277] - Update ReadableStream to latest standard version, a=testonly 2018-04-15 09:37:20 +01:00
subresource-integrity Bug 1442264 [wpt PR 8839] - Make more python code parse as python3., a=testonly 2018-03-31 22:28:31 +01:00
svg Bug 1452065 [wpt PR 10345] - Fix all lint errors in svg/import/*, a=testonly 2018-04-15 09:36:33 +01:00
svg-aam
tools Merge inbound to mozilla-central. a=merge 2018-04-25 00:50:59 +03:00
touch-events Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
trusted-types
uievents Bug 1450009 [wpt PR 10243] - Add wpt test for back/forward mouse buttons., a=testonly 2018-04-15 08:37:29 +01:00
upgrade-insecure-requests Bug 1454390 - Give link-upgrade test a long timeout, r=ato 2018-04-19 13:51:02 +01:00
url Bug 1450258 [wpt PR 10252] - Make URLSearchParamsIterationSource not snapshot, a=testonly 2018-04-15 09:29:41 +01:00
user-timing Bug 1453439 [wpt PR 10434] - Remove http/tests/w3c, a=testonly 2018-04-24 12:22:31 +00:00
vibration
visual-viewport Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
wai-aria Bug 1435337 - Update web-platform-tests to revision 7174d3e89f3057aae399483194dc4b608ee8c933, a=testonly 2018-02-02 19:09:23 +00:00
wake-lock Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
wasm Bug 1450392 [wpt PR 8927] - Delete wasm/many-memories.window.js WPT test, a=testonly 2018-04-15 09:23:51 +01:00
web-animations Bug 1456688 - Set easing member in result of getComputedTiming(); r=hiro 2018-04-25 12:25:26 +09:00
web-nfc Bug 1452313 [wpt PR 10284] - WebNFC: Use [SecureContext] instead of manual check, a=testonly 2018-04-15 09:36:42 +01:00
web-share
webaudio Bug 1452320 [wpt PR 10320] - Move AudioNode tests to WPT, a=testonly 2018-04-15 09:37:42 +01:00
webauthn Bug 1452296 [wpt PR 10285] - Check inherited interfaces exist, a=testonly 2018-04-15 09:30:53 +01:00
webdriver Bug 1456799 - [wdspec] Use wdclient to get a named cookie in add cookie tests. r=maja_zf 2018-04-25 17:59:09 +02:00
webgl Bug 1419296 - Update web-platform-tests to fa27b785c62e67cc3a12201612db188c4fdd49ad, a=testonly 2017-11-21 07:39:00 +00:00
webmessaging Bug 1450644 - WorkerRef should make APIs able to work until the worker is completely terminated - part 2 - BroadcastChannel, r=asuth 2018-04-17 20:51:02 +02:00
webrtc Bug 1453975 [wpt PR 10458] - Fix race in track-stats.https.html test., a=testonly 2018-04-24 12:22:35 +00:00
websockets Bug 1446366 - Correct readyState in WebSocket when worker goes away, r=smaug 2018-03-18 23:13:01 +01:00
webstorage Bug 1452594 [wpt PR 10357] - Avoid async/await in /webstorage/idlharness.html, a=testonly 2018-04-15 09:39:21 +01:00
webusb Bug 1447862 [wpt PR 10130] - Make BlueTooth/USB requestDevice non-consuming., a=testonly 2018-04-15 09:37:06 +01:00
webvr Bug 1452593 [wpt PR 10356] - Properly define EventInit in /webvr/idlharness.https.html, a=testonly 2018-04-15 09:39:14 +01:00
webvtt Bug 1452643 [wpt PR 9855] - Update the webvtt IDL file, a=testonly 2018-04-15 08:34:36 +01:00
webxr Bug 1435337 - Update web-platform-tests to revision 7174d3e89f3057aae399483194dc4b608ee8c933, a=testonly 2018-02-02 19:09:23 +00:00
workers Bug 1451770 [wpt PR 10331] - Implement deprecation of content type sniffing for workers., a=testonly 2018-04-20 21:59:03 +01:00
worklets Bug 1433144 - Update web-platform-tests to revision 2e19bfdaee6edb2c1069c07e14037284167284a3, a=testonly 2018-01-30 17:46:09 +00:00
x-frame-options Bug 1453248 [wpt PR 10411] - Return null from contentDocument/getSVGDocument() for cross-origin documents., a=testonly 2018-04-24 12:22:26 +00:00
xhr Bug 1451598 [wpt PR 10326] - Add tests to check that the User-Agent header is set for XHR requests, a=testonly 2018-04-15 09:29:26 +01:00
.codecov.yml
.gitignore Bug 1447843 [wpt PR 10127] - Fix resources/test (when running locally), a=testonly 2018-04-15 08:35:12 +01:00
.gitmodules
.pyup.yml Bug 1440672 [wpt PR 8979] - Support wpt run safari (Safari 11 and Technology Preview), a=testonly 2018-03-31 22:28:54 +01:00
.travis.yml Bug 1453440 [wpt PR 10435] - Stop running tests on pypy, a=testonly 2018-04-24 12:22:21 +00:00
CONTRIBUTING.md
LICENSE
LICENSE.md
README.md Bug 1452281 [wpt PR 10294] - Correct reference to certificate file, a=testonly 2018-04-15 09:27:24 +01:00
check_stability.ini
config.default.json Bug 1446463 [wpt PR 10078] - Get rid of last web-platform.test, make host_ip always present, a=testonly 2018-04-15 08:33:44 +01:00
lint.whitelist Bug 1447040 [wpt PR 10096] - Correctly reject in-progress body methods with AbortError, a=testonly 2018-04-16 14:21:46 +01:00
serve.py
server-side.md
testharness_runner.html
update-built-tests.sh Bug 1429043 - Update web-platform-tests to revision 4de5305adf3d33badc23952672bcf28168fea37e, a=testonly 2018-01-09 14:45:43 +00:00
wpt
wpt.py

README.md

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/w3c/web-platform-tests.

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 preceed 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 (note this requires an Administrator privileged shell):

python wpt make-hosts-file >> %SystemRoot%\System32\drivers\etc\hosts

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 preceed 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, copy the config.default.json file to config.json and edit the new file, replacing the part that reads:

"http": [8000, "auto"],
"https":[8443]

to some ports of your choice e.g.

"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 preceed the prior command with python or the path to the python binary.

python wpt 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.zip archive for your platform from Mozilla CI.

Then extract certutil[.exe] from the tests.zip 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 requried 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 pregenerated 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, 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).

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.

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.

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