Skip to content
Test suites for Web platform specs — including WHATWG, W3C, and others
Branch: master
Clone or download
docfaraday and moz-wptsync-bot Make the identity verification code a little easier to read, and reje…
…ct identity mismatch with an OperationError

Differential Revision: https://phabricator.services.mozilla.com/D33991

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1556801
gecko-commit: 69f030c1d90e04bf3d90bf9ac56a392657d005b1
gecko-integration-branch: central
gecko-reviewers: jib
Latest commit f9f5663 Jun 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github [docs] Build w/GH Actions and deploy w/GH Pages May 14, 2019
.well-known Part 1: Stop using |global|, and fix a typo ('param' should have been… Apr 25, 2019
2dcontext Canvas::TestMetrics: Measure the TextMetrics info after loading the font Jun 7, 2019
BackgroundSync Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
FileAPI Add more tests for FileReader.result. (#7494) Apr 29, 2019
IndexedDB [IndexedDB] Promote test isolation (#16436) Jun 18, 2019
WebCryptoAPI [WebCryptoAPI] Remove race condition (#14291) Dec 10, 2018
WebIDL rm @tobie from META files (#17209) Jun 6, 2019
accelerometer Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
accname accname: tweak two tests for clarity Sep 28, 2018
acid Add a reference for Acid2 that should pixel-for-pixel match Mar 7, 2019
ambient-light Remove inactive reviewers (#14798) Mar 14, 2019
animation-worklet Initial implementation of WorkletAnimationEffect May 20, 2019
annotation-model Consolidate .gitignore files under the root (#15952) Mar 25, 2019
annotation-protocol Consolidate .gitignore files under the root (#15952) Mar 25, 2019
annotation-vocab Consolidate .gitignore files under the root (#15952) Mar 25, 2019
apng Add more spec links to META.yml (#12045) Jul 18, 2018
appmanifest Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
audio-output Mark MediaDevices-related interfaces as SecureContext Mar 2, 2019
background-fetch [Background Fetch] Add web platform tests for match. Mar 22, 2019
battery-status
beacon Allow browsers to block mixed content requests from cross-origin test… Jun 12, 2019
bluetooth Rewrite some tests using promise_rejects May 27, 2019
clear-site-data WPT for Clear-Site-Data executionContexts Aug 2, 2018
client-hints Add the remaining Client Hints to Feature Policy. Jun 10, 2019
clipboard-apis Async Clipboard: Rename tests and group tests in directories. Apr 18, 2019
common [WPT/common/security-features] Support worker-related scopes Apr 29, 2019
compat Load Ahem as a webfont everywhere (part 2) (#17173) Jun 11, 2019
conformance-checkers cc Update messages.json Jun 3, 2019
console Convert compat+console+fullscreen+storage+url+xhr to idl_test (#12405) Aug 10, 2018
content-security-policy [csp] Wait for all tests to be defined (#15631) Jun 18, 2019
cookie-store [cookie-store] Promote stability in test results (#16415) Jun 18, 2019
cookies Read the Cookie response headers from a `white-space: pre' element so… May 29, 2019
core-aam ARIA: Add team contact to suggested reviewers for wai-aria and core-a… Jul 19, 2018
cors CORS/XHR: mark Client Hints tentative Mar 25, 2019
credential-management Add spec links to META.yml Jul 17, 2018
css [css-flexbox] Clamp the cross-size by the min/max size Jun 22, 2019
custom-elements Add CEReactions and CustomElementCallbacks to toggleAttribute Jun 18, 2019
device-memory Remove inactive reviewers (#14798) Mar 14, 2019
docs [docs] Deprecate some requirement flags (#15964) Jun 21, 2019
dom Align legacy callback interface tests (#15122) May 27, 2019
domparsing domparsing: Add comments about specification issue URLs May 9, 2019
domxpath Remove remaining IDL `implements` (#17060) May 29, 2019
dpub-aam Add more spec links to META.yml (#12045) Jul 18, 2018
dpub-aria Add more spec links to META.yml (#12045) Jul 18, 2018
editing part 0: Add new WPT to check whether `document.execCommand()` without… Jun 10, 2019
element-timing [ElementTiming] Add tests for generated and shadow text Jun 20, 2019
encoding Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
encrypted-media Remove inactive reviewers (#14798) Mar 14, 2019
entries-api webkitRelativePath preserves common ancestors (#13988) Nov 9, 2018
event-timing Reland "[EventTiming] Fix programmatic click test" May 14, 2019
eventsource Fix spelling errors in /tests/wpt Jun 6, 2019
feature-policy CSS Filter: Default value for filter functions Jun 8, 2019
fetch Prevent leaking Sec-CH-/Sec-Fetch- Request Headers on HTTPS Downgrade… Jun 18, 2019
fonts Load Ahem as a webfont everywhere (part 1/2) (#17148) Jun 4, 2019
fullscreen Only allow one full screen per user activation - experimental May 29, 2019
gamepad Remove inactive reviewers (#14798) Mar 14, 2019
generic-sensor [generic-sensor] Avoid unhandled promise rejection (#16414) Apr 19, 2019
geolocation-API Remove timeout in async_test for geolocation-API tests Nov 27, 2018
geolocation-sensor Feature Policy JS API Update: Add document.featurePolicy.features Jan 24, 2019
graphics-aam Add more spec links to META.yml (#12045) Jul 18, 2018
gyroscope Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
hr-time Remove test-level assert property from tests (#14409) Dec 10, 2018
html-longdesc Add more spec links to META.yml (#12045) Jul 18, 2018
html-media-capture Remove inactive reviewers (#14798) Mar 14, 2019
html location.hash = '' should always result in an empty fragment, not no-… Jun 20, 2019
idle-detection [idle] Add a threshold minimum of 60 seconds in IdleDetector Mar 25, 2019
imagebitmap-renderingcontext Reland "Reland "Adding support to bitmaprenderer in OffscreenCanvas"" Jun 3, 2019
images Add fyi logos (#15076) Jan 30, 2019
import-maps [Import Maps] Apply inline-script CSP checks to import maps Mar 20, 2019
inert Move inert tests to top level directory and rename with .tentative Aug 30, 2018
infrastructure Expect elementPosition.html to timeout Jun 21, 2019
input-device-capabilities Convert Input Device Capabilities IDL test to use idl_test (#12576) Aug 27, 2018
input-events Update web platform tests for InputEvent.data and InputEvent.dataTran… Feb 20, 2019
interfaces Update interfaces/webrtc.idl (#17423) Jun 21, 2019
intersection-observer WebKit export of https://bugs.webkit.org/show_bug.cgi?id=198784 (#17323) Jun 13, 2019
js [js] Remove invalid tests for JavaScript built-ins Mar 27, 2019
keyboard-lock Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
keyboard-map Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
kv-storage Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
largest-contentful-paint Implement basic LargestContentfulPaint API Jun 20, 2019
layout-instability Update LayoutShift entryType and rename "fraction" to "value". May 16, 2019
lifecycle Enable PauseExecutionContextOnBackgroundFreeze Jun 20, 2019
loading Fix CSSPreloadScanner to avoid missing rules (reland) Nov 27, 2018
longtask-timing Convert Long Tasks API idlharness test to use `idl_test` (#17344) Jun 17, 2019
magnetometer Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
mathml Add tests for movablelimits (#17354) Jun 17, 2019
media-capabilities Media Capabilities: enable API on workers. May 14, 2019
media-source MSE: Let external/wpt/.../mediasource-play have longer timeout Jun 14, 2019
media Ship CreateImageBitmap resize options Aug 13, 2018
mediacapture-depth [getUserMedia] Revert obsolete depthNear, depthFar, focalLengthX, foc… Mar 21, 2019
mediacapture-fromelement Remove Chrome-specific dependency and modernize. Dec 18, 2018
mediacapture-image Fix "MojoInterfaceInterceptor is not defined" error May 29, 2019
mediacapture-record Check that all events are fired as expected for MediaRecorder-stop.html. Jan 15, 2019
mediacapture-streams Unset durationchange handler in WPT MS-ME-firstframe cleanup. Jun 13, 2019
mediasession [Media Session] Implement stop action handler Jun 13, 2019
mimesniff Fetch: Content-Type parsing Nov 27, 2018
mixed-content [WPT/common/security-features] Support worker-related scopes Apr 29, 2019
mst-content-hint Enable the "Content hint" attribute of MediaStreamTrack Aug 16, 2018
native-file-system [Native File System] Create FileSystemFileWriterImpl to mirror the re… Jun 22, 2019
navigation-timing [Navigation Timing] Replace TAO restrictions with same-origin ones Jun 21, 2019
netinfo Fix netinfo Web Platform Test Apr 3, 2019
network-error-logging Add signed exchange reporting error test cases Feb 22, 2019
notifications Remove inactive reviewers (#14798) Mar 14, 2019
offscreen-canvas Canvas::TestMetrics: Add tests to measure the TextMetrics info for of… Jun 7, 2019
old-tests Try less trailing newlines Aug 6, 2018
orientation-event Restrict the rest manual tests to secure origins (#15939) Mar 20, 2019
orientation-sensor Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
origin-policy [Origin Policy] Implement error reporting via Reporting API Mar 4, 2019
page-visibility Remove unused statement Jun 21, 2019
paint-timing Remove inactive reviewers (#14798) Mar 14, 2019
payment-handler Mark a couple manual tests as manual (#17399) Jun 19, 2019
payment-method-basic-card Fix a bunch of bugs 🤦‍♂️ Mar 22, 2019
payment-method-id Remove inactive reviewers (#14798) Mar 14, 2019
payment-request Return show promise instead of the resolved value of show promise (#1… Jun 19, 2019
performance-timeline Caching vectors for PerformanceObserver.supportedEntryTypes Jun 10, 2019
permissions [Background Sync] Add 'periodic-background-sync' permission. May 2, 2019
picture-in-picture [Picture-in-Picture] Remove shadow DOM support for pseudo class Apr 30, 2019
pointerevents Reland "Automate pointerevent pointerlock tests" Jun 20, 2019
pointerlock Automate some pointerlock wpt Mar 12, 2019
portals Remove unused BroadcastChannel in portal-activate-data.html. Jun 21, 2019
preload Adjust imagesrcset test for device pixel ratio (#17184) Jun 5, 2019
presentation-api
priority-hints Add more suggested reviewers for Priority Hints Aug 7, 2018
proximity Remove inactive reviewers (#14798) Mar 14, 2019
push-api Rename idlharness tests for [SecureContext] APIs to .https. (#12353) Aug 8, 2018
quirks [LayoutNG] Skip "replaced % resolution" quirk on ortho-roots. Jun 18, 2019
referrer-policy Apply iframe referrerpolicy attribute to non-initial loads. May 28, 2019
remote-playback Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
reporting Add comments to tests Feb 20, 2019
requestidlecallback Add <meta name=timeout content=long> to WPT in SlowTests Mar 22, 2019
resize-observer Add NS_FRAME_SVG_LAYOUT into SVGViewFrame and nsSVGStopFrame. May 31, 2019
resource-timing worker: Add wpt for ResourceTiming on nested dedicated workers May 13, 2019
resources rm @tobie from META files (#17209) Jun 6, 2019
screen-capture Mark MediaDevices-related interfaces as SecureContext Mar 2, 2019
screen-orientation Add element that represents the actual fragment Mar 25, 2019
scroll-animations Integrating ScrollTimeline with main thread WebAnimations. Jun 18, 2019
secure-contexts Rewrite secure-contexts/idlharness.any.js to use idl_test (#12386) Aug 9, 2018
selection style> and <script> elements should be included in Selection.toString… May 14, 2019
serial [serial] Implement feature policy checks Feb 8, 2019
server-timing Make Server-Timing tests more resilient (#13789) Nov 2, 2018
service-workers Worker: Deflake worker-interception.https.html Jun 21, 2019
shadow-dom Test attachShadow() with disabledFeatures=['shadow'] May 16, 2019
shape-detection [shapedetection] Add some shapedetection tests Jun 24, 2019
signed-exchange Fix generate-test-sxgs.sh for OS X Jun 10, 2019
sms SMS API: Clean up SMS API mojom interface Jun 19, 2019
speech-api Update SpeechSynthesisUtterance-volume-manual.html (#16752) May 9, 2019
std-toast Move toast/ directory to elements/ directory and update paths Jun 21, 2019
storage Reland "Add quota usage details tests for all other storage backends." Jan 24, 2019
streams Web Platform Tests: Append comment with instructions for chrome Apr 26, 2019
subresource-integrity Refactor SRI script tests to prepare for Preload + SRI Jun 20, 2019
svg-aam Add more spec links to META.yml (#12045) Jul 18, 2018
svg Use the referenced element to check whether to ignore a mutation event Jun 14, 2019
timing-entrytypes-registry Prevent fooling PerformanceObserver.supportedEntryTypes (#17242) Jun 13, 2019
tools Add mandatory capabilities parameter in the body for the webdriver ne… Jun 22, 2019
touch-events Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
trusted-types [Trusted Types] Add xlink:href trusted type checks to SMIL elements. Jun 19, 2019
uievents Add WPT tests for WheelEvent Jun 9, 2019
upgrade-insecure-requests [WPT] Move wrapResult to common.js and clarify requestVia*() return v… Apr 12, 2019
url Make url/historical.any.js run in shell environment May 22, 2019
user-timing [UserTimingL3] Replace SyntaxError with TypeError. Jun 12, 2019
vibration Remove inactive reviewers (#14798) Mar 14, 2019
visual-viewport Revise viewport-resize-event-on-load-overflowing-page.html to avoid b… May 23, 2019
wai-aria Add IDL tests for WAI-ARIA (#12822) Sep 4, 2018
wake-lock [wake-lock] Add tests for AbortSignal (#15943) May 29, 2019
wasm Add a test for transferring a WebAssembly ArrayBuffer May 10, 2019
web-animations Optimize cubic bezier solver. Jun 21, 2019
web-locks Add assert descriptions to Web Locks test to aid debugging (#15016) Jan 23, 2019
web-nfc [webnfc] Remove incorrect tests (#17425) Jun 21, 2019
web-share Web Share: Manual tests for file sharing May 2, 2019
webaudio Revert "Active Processing for ConvolverNode" Jun 12, 2019
webauthn Simplify the Web Authentication idlharness test Apr 2, 2019
webdriver [wdspec] Add test to make sure "Switch To Window" keeps tab modal sta… Jun 19, 2019
webgl Mark WebGL idlharness tests as slow Feb 15, 2019
webmessaging Extend CheckInnerWindowCorrectness() to check the state of the worker Apr 25, 2019
webmidi Rename idlharness.window.js to idlharness.https.window.js (#13634) Oct 20, 2018
webrtc-identity Make the identity verification code a little easier to read, and reje… Jun 24, 2019
webrtc-quic Reland "Disallows reusing RTCIceTransport." May 3, 2019
webrtc-stats Make webrtc-stats idlharness.js test depend on webrtc (#14983) Jan 24, 2019
webrtc Work around and fix harness errors caused by uncaught promise rejecti… Jun 24, 2019
websockets Set a long timeout Jun 20, 2019
webstorage Update test for Storage [[Set]]. Apr 15, 2019
webusb Check for detached ArrayBuffers in WebUSB transfer functions May 7, 2019
webvr Restructure WebXR & WebVR Feature Policy tests May 13, 2019
webvtt part2 : adjust 'left' property for reference cues. Jun 14, 2019
webxr Simplifying inline WebXR rendering May 31, 2019
workers Prevent the error from triggering a page error in Worker-nested-impor… Jun 13, 2019
worklets [wpt/upgrade-insecure-requests] Add worker/worklet tests Jan 10, 2019
x-frame-options Fix a race condition in WPT related to postMessage May 22, 2019
xhr Fix access-control-basic-options-not-supported.py to consistently fai… May 28, 2019
.azure-pipelines.yml [Azure] Fix logging params Jun 20, 2019
.codecov.yml Add codecov configutation. (#5623) Apr 24, 2017
.gitattributes Disable EOL conversion for all of WPT May 22, 2019
.gitignore Add submissions/ to .gitignore Apr 26, 2019
.mailmap Add Tess to .mailmap Feb 12, 2019
.pyup.yml Run mypy on the manifest code. Apr 24, 2019
.taskcluster.yml Fix #17286: TC needs to update the apt database before installing (#1… Jun 12, 2019
CODEOWNERS Add /tools/third_party to CODEOWNERS Feb 5, 2019
CONTRIBUTING.md Use the The 3-Clause BSD License from opensource.org (#11191) Apr 25, 2019
LICENSE.md Use the The 3-Clause BSD License from opensource.org (#11191) Apr 25, 2019
README.md [docs] Remove instructions for submodules (#16650) May 9, 2019
check_stability.ini Implement --affected as a flag of `wpt run` Dec 10, 2018
lint.whitelist Revert "Ignore lint failures until we import a rev with them fixed" (#… Jun 17, 2019
server-side.md Make tests self-hosting Jan 6, 2014
testharness_runner.html Add testharness_runner file here for now. Apr 17, 2015
update-built-tests.sh [css-ui] Test appearance <compat> values and 'auto' May 21, 2019
wpt Add a wpt command as a frontend to all cli interactions. Jul 26, 2017
wpt.py Allow |python wpt <command>| to work on Windows. Aug 16, 2017

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

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

You can’t perform that action at this time.