blob: 0de32f410f25e4dafb462931af9ef39cb1bd0f41 [file] [log] [blame]
W3C Web Platform Tests in Blink Web Tests
Design Doc:
This directory contains checked out and reduced code from web-platform-tests
( required to run WPT tests as part
of Blink's test infrastructure and some maintenance/configuration code.
The third party code lives entirely in the wpt subdirectory:
For licensing, see README.chromium in parent directory
Files in this directory (non third-party)
This file.
The configuration file used when running WPTServe. Note that this file loads
after wpt/config.default.json and this configuration gets merged onto it. When
changing the ports (HTTP/S, WS/S), make sure to also:
- update `WPT_HOST_AND_PORTS` in
- update WebTestContentBrowserClient::GetOriginsRequiringDedicatedProcess()
Running this script without arguments will remove the existing checkout
(third_party/wpt/wpt) and perform a fresh one. See "Rolling in WPT" for more.
The explicit list of files being kept, everything else not on this list is
deleted when running "./ reduce". Use this file to control what gets
checked in and try to keep the list as small as possible (use what you need).
This directory contains a private key and a certificate of WPTServe, and files
for self-signed CA. By default, WPTServe generates these files using the
"openssl" command, but we check in pre-generated files to avoid "openssl"
These certificates will expire in January 2025. Here is an instruction to
re-generate them:
1. Make sure the following commands are in $PATH.
- base64
- git
- grep
- openssl
- sed
2. Run
3. Look at the "Not After" date in the output of the command, and update
"January 2025" in this document and expiration_date in to new
expiration date.
4. Update certs/*.
Please refer to
5. git commit
6. git cl upload, etc.
Rolling in WPT
If there are new files that need to be rolled in, add the intended files to
the WPTWhiteList. Ensure these files are in the correct order by running
"LC_ALL=C sort WPTWhiteList".
When rolling in new versions of WPT support, modify WPT_HEAD in to
the desired HEAD position. You can then call "./ clone" which will
pull in all the code.
It is also important to update the hashes in the 'Version:' fields of
You can examine what's pulled in and update WPTWhiteList if some new files are
required to run the updated version.
Once you've cloned the repositories you can call "./ reduce" to
remove everything that is not listed in WPTWhiteList.
Note that calling "./" without arguments is equivalent of calling
"./ clone reduce".
Read instructions in WPT README:
Also, check out the WPTServe Documentation
Note that editing /etc/hosts is not required for since
content_shell is invoked with flags to map all *.test domains to
Running web-platform-tests with enabled WPTServe on a local machine
WPTServe is now enabled by default in for tests that live in
WPTServe starts HTTP/S and WS/S servers as separate processes.
The content_shell used to run the tests will receive the URL of each test
(instead of a filename). The document root http://web-platform.test/ maps to
web_test/external/wpt. HTTPS tests are enabled by default.
Example run:
./tools/ external/wpt