Test suites for Web platform specs — including WHATWG, W3C, and others
Switch branches/tags
merge_pr_14159 merge_pr_14150 merge_pr_14145 merge_pr_14144 merge_pr_14141 merge_pr_14140 merge_pr_14139 merge_pr_14137 merge_pr_14136 merge_pr_14133 merge_pr_14131 merge_pr_14130 merge_pr_14129 merge_pr_14128 merge_pr_14127 merge_pr_14126 merge_pr_14125 merge_pr_14124 merge_pr_14123 merge_pr_14121 merge_pr_14120 merge_pr_14119 merge_pr_14117 merge_pr_14116 merge_pr_14115 merge_pr_14113 merge_pr_14108 merge_pr_14106 merge_pr_14105 merge_pr_14104 merge_pr_14103 merge_pr_14102 merge_pr_14101 merge_pr_14098 merge_pr_14097 merge_pr_14096 merge_pr_14092 merge_pr_14090 merge_pr_14086 merge_pr_14085 merge_pr_14084 merge_pr_14080 merge_pr_14079 merge_pr_14078 merge_pr_14077 merge_pr_14076 merge_pr_14075 merge_pr_14071 merge_pr_14068 merge_pr_14067 merge_pr_14066 merge_pr_14065 merge_pr_14063 merge_pr_14062 merge_pr_14061 merge_pr_14058 merge_pr_14057 merge_pr_14056 merge_pr_14055 merge_pr_14054 merge_pr_14053 merge_pr_14052 merge_pr_14051 merge_pr_14050 merge_pr_14049 merge_pr_14048 merge_pr_14047 merge_pr_14046 merge_pr_14045 merge_pr_14043 merge_pr_14042 merge_pr_14040 merge_pr_14039 merge_pr_14038 merge_pr_14036 merge_pr_14035 merge_pr_14034 merge_pr_14032 merge_pr_14031 merge_pr_14030 merge_pr_14028 merge_pr_14027 merge_pr_14026 merge_pr_14024 merge_pr_14023 merge_pr_14022 merge_pr_14021 merge_pr_14020 merge_pr_14019 merge_pr_14018 merge_pr_14017 merge_pr_14016 merge_pr_14015 merge_pr_14012 merge_pr_14011 merge_pr_14010 merge_pr_14009 merge_pr_14008 merge_pr_14007 merge_pr_14006
Nothing to show
Clone or download
davidsgrogan and chromium-wpt-export-bot [css-tables] Some interop tests
The spec doesn't address some behavior that has interop. It also doesn't
address some related behavior that doesn't have interop. These tests
demonstrate both. Hopeful to spur some discussion on
w3c/csswg-drafts#3336

Normally a cell with % width is resized based on an initial measure of
the table's intrinsic widths. But this is not done when the table is
itself inside of a table cell. Engines agree on this but it's not in the
specification.

Engines don't agree on ignoring this step when the table is inside a
shrink-to-fit block. Edge and Chrome perform the step, FF doesn't.

Bug: 613705
Change-Id: I4733b693bed754c3924fe357cdc6d5198d7613df
Reviewed-on: https://chromium-review.googlesource.com/c/1343530
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609897}
Latest commit 9528b40 Nov 21, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.well-known Origin Policy: Add support for Feature Policy. Nov 19, 2018
2dcontext Fix a wrong use of assert_throws in createImageBitmap-invalid-args Oct 26, 2018
BackgroundSync Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
FileAPI Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
IndexedDB Remove timeout in async_test for IndexedDB tests Nov 15, 2018
WebCryptoAPI Remove some suggested reviewers who have asked to be removed (#13796) Oct 30, 2018
WebIDL Request/Response's clone() realm Nov 2, 2018
accelerometer Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
accname accname: tweak two tests for clarity Sep 28, 2018
acid Rename of OWNER files to META.yml Jun 12, 2018
ambient-light Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
animation-worklet Update the Animation Worklet IDL file + test (#12444) Aug 13, 2018
annotation-model Add more spec links to META.yml (#12045) Jul 18, 2018
annotation-protocol Add more spec links to META.yml (#12045) Jul 18, 2018
annotation-vocab Remove some suggested reviewers who have asked to be removed (#13796) Oct 30, 2018
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
async-local-storage [Layered API] Update async local storage implementation and tests Aug 17, 2018
audio-output Add jan-ivar as reviewer. (#13957) Nov 6, 2018
background-fetch [Background Fetch] Remove chromium specific WPT code Nov 19, 2018
battery-status [Battery] Correct IDL file name (#12422) Aug 13, 2018
beacon Fix the test to use http://nonexistent.web-platform.test Oct 25, 2018
bluetooth Preparation of moving LayoutTests to web_tests. Nov 13, 2018
clear-site-data WPT for Clear-Site-Data executionContexts Aug 2, 2018
client-hints Fix processing of double Content-DPR values and add Content-DPR WPT t… Oct 15, 2018
clipboard-apis Add spec links to META.yml Jul 17, 2018
common Make Server-Timing tests more resilient (#13789) Nov 2, 2018
compat Notify andruud on changes to wpt/css/css-properties-values-api. Aug 30, 2018
conformance-checkers cc Update makefile for doc-conformance tests Oct 26, 2018
console Convert compat+console+fullscreen+storage+url+xhr to idl_test (#12405) Aug 10, 2018
content-security-policy Make sure wpt pipes are used in form-action-blocks-navigate-to-allows… Nov 6, 2018
cookie-store Async Cookies: Fix cross-frame test cleanup. Nov 20, 2018
cookies HttpStreamParser: Reject headers with nulls in them. Oct 22, 2018
core-aam ARIA: Add team contact to suggested reviewers for wai-aria and core-a… Jul 19, 2018
cors Fetch: Access-Control-Expose-Headers parsing Nov 13, 2018
credential-management Add spec links to META.yml Jul 17, 2018
css [css-tables] Some interop tests Nov 21, 2018
custom-elements Implement step 1 of "look up a custom element definition" Sep 13, 2018
device-memory Add spec links to META.yml Jul 17, 2018
docs Update to new ServiceWorker spec link Nov 11, 2018
dom allow dispatching event when element is disabled. Oct 31, 2018
domparsing Insert an error message block when parsing was stopped after an error Oct 25, 2018
domxpath Add more spec links to META.yml (#12045) Jul 18, 2018
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 Use MoveParagraphWithClones when moving paragraphs to new list items Oct 17, 2018
encoding Editorial: fix comment in encoding/ Nov 19, 2018
encrypted-media [eme] Ensure license is expired before using it (#8623) Sep 3, 2018
entries-api webkitRelativePath preserves common ancestors (#13988) Nov 9, 2018
eventsource [testharness.js] Remove deprecated API (#12976) Sep 24, 2018
feature-policy Violation reports for 'layout-animations' Nov 16, 2018
fetch Fetch: change Response's statusText's default Nov 20, 2018
fonts Rename of OWNER files to META.yml Jun 12, 2018
fullscreen Keep animations running going to/from fullscreen. Nov 15, 2018
gamepad Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
generic-sensor Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
geolocation-API Add spec links to META.yml Jul 17, 2018
geolocation-sensor Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
graphics-aam Add more spec links to META.yml (#12045) Jul 18, 2018
gyroscope Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
hr-time Merge pull request #8488 from divmain/hr-time-origin-tests Sep 3, 2018
html-longdesc Add more spec links to META.yml (#12045) Jul 18, 2018
html-media-capture Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
html Fix tab/space lint failure on a CLOSED TREE Nov 20, 2018
imagebitmap-renderingcontext Tweak URLs for directories for parts of WHATWG standards Jul 17, 2018
images Remove reviewers who have not joined the web-platform-tests org (#11888) Jul 11, 2018
inert Move inert tests to top level directory and rename with .tentative Aug 30, 2018
infrastructure Revert "Add action_sequence in testdriver" Nov 15, 2018
input-device-capabilities Convert Input Device Capabilities IDL test to use idl_test (#12576) Aug 27, 2018
input-events Use MoveParagraphWithClones when moving paragraphs to new list items Oct 17, 2018
interfaces Update interfaces/netinfo.idl Nov 19, 2018
intersection-observer [IntersectionObserver] Report coordinates as CSS pixels. Sep 28, 2018
js Add more spec links to META.yml (#12045) Jul 18, 2018
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
lifecycle Add some more spec links manually Jul 17, 2018
longtask-timing [LongTasks] Change TaskAttributionTiming name to 'unknown' Nov 15, 2018
magnetometer Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
mathml Increase epsilon value for comparisons in underover-1.html Nov 1, 2018
media-capabilities Update the MediaCapabilities dictionaries to follow the spec more clo… Sep 27, 2018
media-source MSE: Make changeType-play layout tests' audio mime-type be audio-spec… Aug 8, 2018
media Ship CreateImageBitmap resize options Aug 13, 2018
mediacapture-depth Add spec links to META.yml Jul 17, 2018
mediacapture-fromelement Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
mediacapture-image [Image Capture] Add exposureTime constraint. Sep 18, 2018
mediacapture-record Merge pull request #13602 from youennf/mediarecorder-error Nov 4, 2018
mediacapture-streams Wire the resizeMode property to the constraints parsing mechanism. Nov 9, 2018
mediasession Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
mimesniff MIME types: test 0x0B, 0x0C, and newlines Nov 12, 2018
mixed-content Updating tests for Window onerror is not triggered bug fix. Oct 25, 2018
mst-content-hint Enable the "Content hint" attribute of MediaStreamTrack Aug 16, 2018
navigation-timing [DomInteractive] Mark Dom interactive to media document and image doc… Sep 26, 2018
netinfo Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
network-error-logging Fix up a typo in network-error-logging/support/lock.py Nov 19, 2018
notifications Avoid invoking the Notification constructor in service workers (#12500) Aug 15, 2018
offscreen-canvas Tweak URLs for directories for parts of WHATWG standards Jul 17, 2018
old-tests Try less trailing newlines Aug 6, 2018
orientation-event ondeviceorientationabsolute event attribute (#5149) Oct 1, 2018
orientation-sensor Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
origin-policy Origin Policy: Add support for Feature Policy. Nov 19, 2018
page-visibility Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
paint-timing Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
payment-handler Remove tests for supportedTypes from payment handler (#13860) Nov 1, 2018
payment-method-basic-card Remove tests for supportedTypes from basic-card (#13859) Nov 2, 2018
payment-method-id Adding test file to the payment-request-id directory (#13229) Sep 26, 2018
payment-request Make sure rejected promise is unique (#14117) Nov 19, 2018
performance-timeline WPT: Adjust expected timing resolution Oct 29, 2018
permissions [Background Fetch] Surface background-fetch permission. Oct 5, 2018
picture-in-picture [Picture-in-Picture] Move mediastream test to wpt. Nov 14, 2018
pointerevents Revert "Add action_sequence in testdriver" Nov 15, 2018
pointerlock Change the button type to int in the pointerActionSequence API Nov 6, 2018
preload Redo tests Nov 9, 2018
presentation-api [presentation-api] Revise the test for reconnecting multiple presenta… Nov 6, 2018
priority-hints Add more suggested reviewers for Priority Hints Aug 7, 2018
proximity Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
push-api Rename idlharness tests for [SecureContext] APIs to .https. (#12353) Aug 8, 2018
quirks [LayoutNG] Fix vertical-align: text-top in quirks mode Nov 7, 2018
referrer-policy Add referrer-policy module worker tests Nov 20, 2018
remote-playback Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
reporting Add Reporting API IDL file + test (#12496) Aug 15, 2018
requestidlecallback Add spec links to META.yml Jul 17, 2018
resize-observer Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
resource-timing WebKit export of https://bugs.webkit.org/show_bug.cgi?id=190554 Oct 23, 2018
resources Revert "Add action_sequence in testdriver" Nov 15, 2018
screen-capture Merge pull request #13784 from youennf/move-getDisplayMedia-to-MediaD… Nov 14, 2018
screen-orientation Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
scroll-animations Convert Scroll-linked Animations IDL test to use idl_test (#12575) Aug 21, 2018
secure-contexts Rewrite secure-contexts/idlharness.any.js to use idl_test (#12386) Aug 9, 2018
selection Count partial mixins as tested deps (#13878) Nov 9, 2018
server-timing Make Server-Timing tests more resilient (#13789) Nov 2, 2018
service-workers Implement FetchEvent.resultingClientId Nov 16, 2018
shadow-dom FlattenAssignedNodes should check that slots are in shadow root Oct 2, 2018
shape-detection Add some more spec links manually Jul 17, 2018
signed-exchange Add signed-exchange/META.yml (suggested reviewers) (#13791) Nov 2, 2018
speech-api Add self as suggested reviewer of speech-api/ (#13797) Nov 1, 2018
storage Storage API: Register "persistent-storage" permission string Aug 30, 2018
streams [streams] Add tests for aborting pipeTo() Nov 7, 2018
subresource-integrity Remove some suggested reviewers who have asked to be removed (#13796) Oct 30, 2018
svg-aam Add more spec links to META.yml (#12045) Jul 18, 2018
svg Add one more test for viewport units in SVG-in-<img> context Nov 20, 2018
tools [Azure Pipelines] Run pytest tests (and publish results) on macOS Nov 20, 2018
touch-events Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
trusted-types HTMLScriptElement text attributes modified to accept TrustedTypes Nov 12, 2018
uievents Change the button type to int in the pointerActionSequence API Nov 6, 2018
upgrade-insecure-requests Add spec links to META.yml Jul 17, 2018
url Remove some suggested reviewers who have asked to be removed (#13796) Oct 30, 2018
user-timing [UserTimingL3] Fix meature, mark API feature detection Nov 15, 2018
vibration Rewrite Vibration API IDL test to use idl_test (#12433) Aug 14, 2018
visual-viewport Add spec links to META.yml Jul 17, 2018
wai-aria Add IDL tests for WAI-ARIA (#12822) Sep 4, 2018
wake-lock Wake Lock API: Implement Screen WakeLock based on Promises. Aug 18, 2018
wasm Baldr: correctly propagate AbortError from consume stream body operat… Nov 17, 2018
web-animations CSS: Serialize % before px in calc Nov 19, 2018
web-locks Web Locks API: Fix IDL glitch Oct 22, 2018
web-nfc Remove alexshalamov from the suggested reviewers lists (#13706) Oct 25, 2018
web-share Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
webaudio [media] Treat cross-origin redirect as TAINTED only for no-cors requests Nov 9, 2018
webauthn Remove the idl_test test_name argument (always 'idl_test setup') (#12406 Aug 13, 2018
webdriver webdriver: update scroll into view tests to support older user agents ( Nov 20, 2018
webgl Update WebGL IDL files + tests (#12499) Aug 15, 2018
webmessaging Implement PostMessageOptions for Window Nov 2, 2018
webmidi Rename idlharness.window.js to idlharness.https.window.js (#13634) Oct 20, 2018
webrtc-identity Add jan-ivar as reviewer. (#13957) Nov 6, 2018
webrtc-quic Implement RTCQuicStream.waitForReadable() (#14103) Nov 19, 2018
webrtc-stats Add jan-ivar as reviewer. (#13957) Nov 6, 2018
webrtc Merge pull request #14054 from fippo/default-stream-no-msid Nov 20, 2018
websockets Remove the "W3C WebSocket API" prefix from websockets/ tests (#13478) Nov 6, 2018
webstorage Fix assert for StorageEvent constructor test (#13405) Oct 6, 2018
webusb Preparation of moving LayoutTests to web_tests. Nov 13, 2018
webvr Add more spec links to META.yml (#12045) Jul 18, 2018
webvtt fix video reference in webvtt rendering tests Nov 7, 2018
webxr Removes tests for XRStageBoundsPoint Oct 2, 2018
workers Worker: Separate worker-from-blob-url.window.html to filter out faili… Nov 20, 2018
worklets Worklet: Modernize service worker interception tests for worklets usi… Nov 14, 2018
x-frame-options Fix x-frame-options WPTs Sep 19, 2018
xhr FormData: Fix a crash by passing null or non-HTMLFormElement instance… Nov 20, 2018
.azure-pipelines.yml [Azure Pipelines] Run pytest tests (and publish results) on macOS Nov 20, 2018
.codecov.yml Add codecov configutation. (#5623) Apr 24, 2017
.gitignore Fix the .gitignore rules Nov 19, 2018
.gitmodules Fix #7200: Update vendored html5lib to 1.0.1 Jun 6, 2018
.pyup.yml Add requirements_flake8.txt to .pyup.yml Nov 5, 2018
.taskcluster.yml Allow stability-checker failures on Travis and report them on Taskclu… Nov 16, 2018
.travis.yml Allow stability-checker failures on Travis and report them on Taskclu… Nov 16, 2018
CODEOWNERS Add CODEOWNERS to prevent submodule issues May 24, 2018
CONTRIBUTING.md Use https://web-platform-tests.org (#10925) May 9, 2018
LICENSE.md Fix the first header in the license file (#5244) Mar 28, 2017
README.md [README] Exclude label:vendor-imports in PR links Sep 28, 2018
check_stability.ini Stop posting PR results to pulls.web-platform-tests.org (#11060) May 18, 2018
lint.whitelist [testharness.js] Honor test config in workers (#14061) Nov 15, 2018
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 Delete unbuilt css3-selectors tests; move built tests up Aug 24, 2018
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.

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