HTML JavaScript GLSL Python CSS Perl
Switch branches/tags
Latest commit e511e5e Aug 26, 2017 @Hexcles Hexcles committed with foolip Delete an OWNERS accidentally exported from Chromium (#7017)
Sorry, but it seems like a recent change in Chromium's wpt bots accidentally exported this OWNERS file. The bug in our bots is being tracked at https://bugs.chromium.org/p/chromium/issues/detail?id=759181 and we are already working on fixing it.

Due to some fortunate coincidences, this is the only accidental "contamination" thus far, and it is unlikely to have new cases even with the bug present. That being said, we will fix the bug ASAP.
Permalink
Failed to load latest commit information.
.well-known Add README in /.well-known/ to explain why mock-idp.js is hosted there Aug 8, 2017
2dcontext Respect color correct rendering mode in canvas 2D Aug 17, 2017
FileAPI Add real baselines for new .any.js and .worker.js tests (batch 1 of N) Jul 26, 2017
IndexedDB Add real baselines for new .any.js and .worker.js tests (batch 1 of N) Jul 26, 2017
WebCryptoAPI Added [SecureContext] to the subtle attribute May 4, 2017
WebIDL Test IDLs defined in WebIDL using idlharness (#6875) Aug 20, 2017
XMLHttpRequest Porting access-control-preflight-credential-sync from LayoutTest to WPT Aug 25, 2017
accelerometer Generic Sensor: Optimize sensor tests in iframe (#6185) Jul 28, 2017
ambient-light Generic Sensor: Optimize sensor tests in iframe (#6185) Jul 28, 2017
annotation-model Annotation model fixreqs (#4232) Dec 13, 2016
annotation-protocol Add an owner for annotation-protocol Aug 2, 2017
annotation-vocab Annotation vocabulary setup (#4231) Nov 22, 2016
apng Add a web platform test for APNG Apr 12, 2017
app-uri Use correct paths to testharness.js and testharnessreport.js. (#3539) Aug 24, 2016
assumptions Add test that Ahem is installed (#6117) Jun 1, 2017
auxclick Move auxclick wpt test and add automation Apr 28, 2017
background-fetch Rename tag to id in BackgroundFetchRegistration Aug 9, 2017
battery-status Battery-status: Restrict to secure context and top-level browsing con… May 11, 2017
beacon Merge pull request #6655 from Brandr0id/sendBeaconTests Aug 15, 2017
bluetooth Add specific error for Bluetooth's test (#5516) Apr 10, 2017
clear-site-data Verify that various backends are deleted with the "storage" datatype Aug 4, 2017
clipboard-apis Initial version of Async Clipboard API Jul 8, 2017
clipboard Add garykac to clipboard/OWNERS May 3, 2017
common Server Timing: add toJSON() to IDL and WPT Aug 25, 2017
compat Test that webkitHidden and webkitVisibilityState do not exist (#6983) Aug 25, 2017
conformance-checkers cc Update messages.json expectations wording Jun 24, 2017
console Add console timeline timelineEnd historical tests Mar 30, 2017
content-security-policy CSP now prevents opening javascript url windows when they're not allowed Aug 25, 2017
cookies Modify errors from try server, Jan 3, 2017
cors CORS: Access-Control-Expose-Headers and invalid values May 19, 2017
credential-management Initial upload to reland 578729. Aug 22, 2017
css-backgrounds Only need to repaint background for color changes with no image. Aug 16, 2017
css-cascade Separate initial style and viewport/ICB style. Jul 1, 2017
css-font-display Convert CSS font-display test to wpt May 31, 2017
css-font-loading Upstream FontFaceSetLoadEvent constructor test to wpt Apr 26, 2017
css-fonts Parse ranges for font-style in @font-face Aug 11, 2017
css-paint-api PaintWorklet: Move paintWorklet from "window" to "CSS" Aug 25, 2017
css-timing Rename css-timing-1 to css-timing. May 18, 2017
css-typed-om Make CSSKeywordValue's value attribute mutable May 26, 2017
css-values Add test for unset value storage Dec 28, 2016
css Visibility:collapse for table columns Aug 24, 2017
cssom-view [cssom-view] Fix scrollIntoView-empty-args.html flakiness Aug 14, 2017
cssom Merge pull request #6712 from w3c/sync_031785adf4b3a5706977ba5fa06c9a… Aug 2, 2017
custom-elements Don't test custom element error reporting in multiple globals Jul 20, 2017
docs Avoid whitespace errors when updating IDLs (#6859) Aug 14, 2017
dom Don't test descendant combinator Aug 22, 2017
domparsing Stop stripping leading whitespace in `innerHTML`. Aug 15, 2017
domxpath Add a test for the XPath interfaces (#4834) Feb 15, 2017
dpub-aam WAI: Updated tests for wai-aria and dpub-aam (#5877) May 10, 2017
dpub-aria Dpub vocab (#4387) Jan 31, 2017
editing Don't add BR when pruning empty blocks if it's the start of a paragraph Aug 11, 2017
encoding Make incomplete byte sequences near HTML EOF emit a REPLACEMENT CHARA… Aug 2, 2017
encrypted-media [eme] Fix #4279: Don't expect empty configuration to pass (#4287) May 22, 2017
eventsource EventSource: do not allow lastEventId creation when the id contains U… Aug 16, 2017
ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents Convert files with only CRLF line endings to pure LF Jan 28, 2014
feature-policy Remove Chromium-specific file path in WPT feature policy README Aug 25, 2017
fetch Stop stripping whitespace from `data:` URLs in //url. Aug 21, 2017
fonts Remove duplicated css-fonts variations tests Aug 15, 2017
fullscreen Reenable feature policy control over fullscreen Aug 17, 2017
gamepad gamepad: Update spec reference links. Aug 1, 2017
generic-sensor Generic Sensor: Use template literals syntax instead of prefix variab… Aug 18, 2017
geolocation-API Cleanup testharness-related code (#5559) May 5, 2017
gyroscope Generic Sensor: Optimize sensor tests in iframe (#6185) Jul 28, 2017
hr-time Allow Date.now() rounding errors in timeOrigin test Aug 11, 2017
html-imports Remove more testharness.css links (#2217) Mar 31, 2016
html-longdesc Add OWNERS files generated from commit log. Feb 2, 2016
html-media-capture HTML Media Capture: update Web IDL tests (#6272) Aug 15, 2017
html A detached History should throw SecurityError when accessed. Aug 25, 2017
http HTTP Refresh header Aug 9, 2017
imagebitmap-renderingcontext Clean up ImageBitmapRenderingContext tests Nov 14, 2016
images Add a web platform test for APNG Apr 12, 2017
infrastructure Restore use of setTimeout in reftest-wait test Mar 13, 2017
innerText [innerText] Add more tests to setter.html. Mar 30, 2017
input-events Don't use empty contenteditable element (#6861) Aug 14, 2017
interfaces Test IDLs defined in WebIDL using idlharness (#6875) Aug 20, 2017
intersection-observer Intermittent intersection-observer/timestamp.html) Log time deltas. m… Aug 11, 2017
js Use assert_in_array instead of assert_true(x === y || x === z) May 18, 2017
keyboard-lock Rename KeyLock to KeyboardLock and return enum from IPC May 4, 2017
longtask-timing Fix most external/wpt/longtask-timing tests Aug 17, 2017
magnetometer Generic Sensor: Optimize sensor tests in iframe (#6185) Jul 28, 2017
mathml Add @fred-wang as a MathML owner Aug 1, 2017
media-capabilities Media Capabilities: stricter checks for the media configuration inputs. May 11, 2017
media-source Check default media type support with MediaSource.isTypeSupported() Jul 12, 2017
media Moved webm files from mediacapture-fromelement/webm/ to media/ so the… Jul 28, 2017
mediacapture-fromelement Moved webm files from mediacapture-fromelement/webm/ to media/ so the… Jul 28, 2017
mediacapture-image Image Capture: add idlharness WPT May 4, 2017
mediacapture-record MediaRecoder: add idlharness WPT Mar 19, 2017
mediacapture-streams Do not fire ended event on MediaStreamTrack.stop() Aug 16, 2017
mediasession Media Session: move all tests but mojo/ ones to external/wpt/. Feb 9, 2017
microdata Microdata DOM API was removed in whatwg/html@2aaecb8 Oct 8, 2015
mixed-content Avoid sending mixed-content requests for ImageSet contexts May 4, 2017
navigation-timing Fix NavigationTiming2 Jul 11, 2017
netinfo Add noise to the network quality estimates. Aug 16, 2017
notifications Marking tests as HTTPS. Feb 27, 2017
offscreen-canvas Fix OffscreenCanvas resizing behavior Aug 22, 2017
old-tests remove legacy web platform test for <object>. Aug 11, 2017
orientation-event orientation-event: Update idlharness.js tests Mar 23, 2017
orientation-sensor Generic Sensor: Add functionality tests for OrientationSensor (#5870) Aug 7, 2017
page-visibility Merge branch 'pv_onvisibilitychange' into plh/page-visibility/onvisib… Jul 26, 2017
payment-method-basic-card Add OWNERS for payment-method-basic-card Aug 14, 2017
payment-method-id chore(payment-method-id): create dir for incoming tests Jul 21, 2017
payment-request PaymentRequest: supportedMethods must not accept sequence<DOMString> Aug 25, 2017
performance-timeline [performance-timeline] New PerformanceObserver Tests Jul 12, 2017
pointerevents Release mouse pointer capture when it starts drag Jul 27, 2017
pointerlock [PointerLock] Add null check before dispatching click event May 5, 2017
preload Link header preload on a subresource triggers a preload Aug 18, 2017
presentation-api [presentation-api] Check both addEventListener and onxxx (#5933) May 19, 2017
progress-events Consolidate redundant ProgressEvent constructor tests (#4616) Jan 24, 2017
proximity followup. Fix web platform tests that either depended on the old spec… Jan 3, 2017
quirks-mode Tested class names are queriable after adoption. (#6337) Jun 25, 2017
referrer-policy Remove legacy command line tools to prevent confusion (#6751) Aug 4, 2017
remote-playback [RemotePlayback] Fix layout tests for remote playback. Jun 19, 2017
resource-timing Fixed the single resource tests, and made them stable Aug 18, 2017
resources Test Ed25519 signatures with CSP. Aug 25, 2017
screen-orientation Add marcoscaceres as owner Feb 27, 2017
scroll-anchoring Finish converting scroll anchoring tests to web-platform-tests. Jun 5, 2017
secure-contexts Fix basic-popup-and-iframe-tests.https.js Jun 2, 2017
selection Update Selection.webidl to match spec May 5, 2017
selectors Reduce assert_throws(null, ...) usage in cors/ and selectors/ Apr 7, 2017
server-timing Server Timing - duplicate names WPT Aug 25, 2017
service-workers Add WPT tests for clients.claim() of Dedicated Worker and Shared Worker Aug 21, 2017
shadow-dom Add `shadowdom-customelements` tests (#5705) Jul 12, 2017
staticrange [InputEvent] Make StaticRange immutable and move tests to wpt Apr 14, 2017
storage Add real baselines for new .any.js and .worker.js tests (batch 1 of N) Jul 26, 2017
streams Streams: consolidate pipeThrough tests (#6762) Aug 8, 2017
subresource-integrity Test Ed25519 signatures with CSP. Aug 25, 2017
svg-aam Placeholder for svg-aam tests Jan 31, 2017
svg Remove non-existent 'textContent' element from svg/interfaces.html Aug 16, 2017
tools Adding WebDriver support for Internet Explorer to wptrunner (#6981) Aug 23, 2017
touch-events Expand on the Touch constructor tests (#3748) Sep 29, 2016
uievents Add some names to asserts Aug 21, 2017
upgrade-insecure-requests Basic tests for Upgrade-Insecure-Requests. (#4292) Dec 8, 2016
url Add @TimothyGu to url/OWNERS (#6569) Jul 18, 2017
user-timing upadte pull request #4976 Jul 26, 2017
vibration Remove more testharness.css links (#2217) Mar 31, 2016
viewport Delete an OWNERS accidentally exported from Chromium (#7017) Aug 26, 2017
wai-aria wai-aria: Correct several MSAA tests (#6908) Aug 16, 2017
wasm Dynamically adjust address space limit for array buffer reservations (#… Aug 11, 2017
web-animations Fix rotate_to_matrix. Aug 2, 2017
web-nfc Web NFC: Convert Chromium Layout tests to testharness tests (#6490) Aug 2, 2017
web-share interfaces/web-share: Changed IDL to match spec change. Jul 7, 2017
webaudio Remove function assert_array_approx_equals (#6749) Aug 4, 2017
webauthn removing stray debug statement Oct 31, 2016
webdriver [webdriver] Element Send Keys puts insertion point at end of contente… Aug 22, 2017
webgl Allow async webgl conformance tests to complete. Apr 17, 2017
webmessaging Make MessageEvent#ports a non-nullable FrozenArray. Aug 16, 2017
webrtc setup onnegotiationneeded before checking it Aug 24, 2017
websockets WebSocket: also test event origin May 18, 2017
webstorage Meta: update some READMEs to point to the HTML Standard Apr 5, 2017
webusb Fix flake in webusb/idlnarness.https.html Aug 11, 2017
webvr Removed deprecated WebVR functionality Apr 5, 2017
webvtt Use Blob URLs instead of data URLs for WebVTT tests Aug 25, 2017
workers [webvtt] Update WebVTT tests for [Exposed=Window] Aug 23, 2017
x-frame-options Fix lint errors May 18, 2017
.codecov.yml Add codecov configutation. (#5623) Apr 24, 2017
.gitignore add webdriver tests for Get Status command Jul 27, 2017
.gitmodules Add widlproc submodule Apr 19, 2017
.travis.yml re-add chrome to the list of allowed failures (#6919) Aug 17, 2017
CONTRIBUTING.md Meta: make CONTRIBUTING.md point to documentation Mar 16, 2017
LICENSE.md Fix the first header in the license file (#5244) Mar 28, 2017
README.md Add pregenerated certificates to the repo and use them by default. Aug 21, 2017
check_stability.ini change webhook URL and add functionality for each job to post to bot Aug 9, 2017
config.default.json Add pregenerated certificates to the repo and use them by default. Aug 21, 2017
lint.whitelist Permit set_timout in lint.whitelist Aug 18, 2017
serve.py Add a warning when running ./serve when tools.serve cannot be imported ( Oct 30, 2016
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 Add test that Ahem is installed (#6117) Jun 1, 2017
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/w3c/web-platform-tests.

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 following entries are required:

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

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

Running Tests Manually

The test server can be started using

./wpt serve

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

"http": [8000, "auto"]

to some port of your choice e.g.

"http": [1234, "auto"]

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.

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 examaple 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

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 mut bre prefixed with python or the path to the python binary (if python is not in your %PATH%).

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.

Certificates

By default pregenerated certificates for the web-platform.test domain are provided in the repository. 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).

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 [email protected] 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