blob: ae1cabc6323fc67450a4fc5996debaa39256ff9a [file] [log] [blame]
W3C Web Platform Tests in Blink Layout Tests
Design Doc: https://goo.gl/iXUaZd
This directory contains checked out and reduced code from web-platform-tests
(https://github.com/w3c/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:
Tools/Scripts/webkitpy/thirdparty/wpt/wpt
Besides the reduced web-platform-tests repository, the wpt subdirectory also
contains wpt/tools submodule (https://github.com/w3c/wpt-tools) and
wpt/tools/wptserve (https://github.com/w3c/wptserve) directories.
For licensing, see README.chromium in parent directory
(Tools/Scripts/webkitpy/thirdparty/README.chromium).
**
Files in this directory (non third-party)
README.chromium
===============
This file.
wpt.config.json
===============
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 update the python code too.
checkout.sh
===========
Running this script without arguments will remove the existing checkout
(thirdparty/wpt/wpt) and perform a fresh one. See "Rolling in WPT" for more.
WPTHeads
========
List of git commit-ish for the WPT repositories. File format is as follows:
First line: HEAD position for web-platform-tests.
Rest of lines: parent directory, submodule name, HEAD position for submodule.
The submodule checkout is performed in order when running ./checkout.sh.
WPTWhiteList
============
The explicit list of files being kept, everything else not on this list is
deleted when running "./checkout.sh reduce". Use this file to control what gets
checked in and try to keep the list as small as possible (use what you need).
certs/
======
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"
dependency.
These certificates will expire in January 2025. Here is an instruction to
re-generate them:
1. Add "openssl" command to PATH.
2. Apply the following change locally:
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt.config.json b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt.config.json
index 6243954..84fd3f4 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt.config.json
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt.config.json
@@ -9,13 +9,5 @@
"https": [8444],
"ws": [9001],
"wss": [9444]
- },
- "ssl": {
- "type": "pregenerated",
- "encrypt_after_connect": false,
- "pregenerated": {
- "host_key_path": "../certs/127.0.0.1.key",
- "host_cert_path": "../certs/127.0.0.1.pem"
- }
}
}
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/sslutils/openssl.py b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/sslutils/openssl.py
index 5b571c0..223a18b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/sslutils/openssl.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/sslutils/openssl.py
@@ -207,7 +207,7 @@ class OpenSSLEnvironment(object):
def __init__(self, logger, openssl_binary="openssl", base_path=None,
password="web-platform-tests", force_regenerate=False,
- duration=30, base_conf_path=None):
+ duration=3000, base_conf_path=None):
"""SSL environment that creates a local CA and host certificate using OpenSSL.
By default this will look in base_path for existing certificates that are still
3. Run third_party/WebKit/Tools/Scripts/run-blink-wptserve
4. Type Enter key to terminate it.
5. Revert the local change. e.g. git reset --hard HEAD
6. Replace certs/ with wpt/_certs/
% rm -fr certs
% mv wpt/_certs certs
7. Look at *.pem, and update "January 2025" in this document and expiration_date
in wptserve.py to new expiration date.
8. git commit -a
9. git cl upload, etc.
TODO(tkent): Make a script to re-generate keys and certificates.
**
Rolling in WPT
When rolling in new versions of WPT support, use WPTHeads to adjust the HEAD
positions. You can then call "./checkout.sh clone" which will pull in all the
code and required submodules.
You can check in the latest code by setting the HEAD commit-ish to "master" on
each line, afterwards make sure to use the actual SHA1s to lock down the HEAD
positions. It is also important to update the hashes in the 'Version:' fields of
Tools/Scripts/webkitpy/thirdparty/README.chromium.
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 "./checkout.sh reduce" to
remove everything that is not listed in WPTWhiteList.
Note that calling "./checkout.sh" without arguments is equivalent of calling
"./checkout.sh clone reduce".
**
Configuration
Read instructions in WPT README:
https://github.com/w3c/web-platform-tests/blob/master/README.md
Also, check out the WPTServe Documentation
(https://wptserve.readthedocs.org/en/latest/).
Note that editing /etc/hosts is not required for run-webkit-tests since
content_shell is invoked with flags to map all *.test domains to 127.0.0.1.
**
Running web-platform-tests with enabled WPTServe on a local machine
Starting run-webkit-tests with the --enable-wptserve flag will start WPTServe
for tests which live in LayoutTests/external/wpt.
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
LayoutTests/external/wpt. HTTPS tests are enabled by default.
Example run:
./Tools/Scripts/run-webkit-tests --enable-wptserve external/wpt