mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 04:39:03 +02:00
--HG-- rename : testing/web-platform/tests/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.UNSPECIFIED_EVENT_TYPE_ERR.html => testing/web-platform/tests/csp/csp-inline-script.html rename : testing/web-platform/tests/DOMEvents/tests/submissions/Microsoft/converted/Determined.candidate.EventListeners.html => testing/web-platform/tests/dom/events/Event-dispatch-handlers-changed.html rename : testing/web-platform/tests/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.NOT_SUPPORTED_ERR.html => testing/web-platform/tests/dom/events/Event-dispatch-redispatch.html rename : testing/web-platform/tests/DOMEvents/tests/submissions/Microsoft/converted/Propagation.path.target.moved.html => testing/web-platform/tests/dom/events/Event-dispatch-target-moved.html rename : testing/web-platform/tests/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.DISPATCH_REQUEST_ERR.html => testing/web-platform/tests/dom/events/Event-dispatch-target-removed.html rename : testing/web-platform/tests/DOMEvents/event-phases-order.html => testing/web-platform/tests/html/dom/documents/dom-tree-accessors/Document.currentScript.html rename : testing/web-platform/tests/tools/scripts/html5lib_test.xml => testing/web-platform/tests/html/tools/html5lib_test.xml rename : testing/web-platform/tests/tools/scripts/html5lib_test_fragment.xml => testing/web-platform/tests/html/tools/html5lib_test_fragment.xml rename : testing/web-platform/tests/tools/scripts/update_html5lib_tests.py => testing/web-platform/tests/html/tools/update_html5lib_tests.py rename : testing/web-platform/tests/tools/scripts/lint.py => testing/web-platform/tests/tools/lint/lint.py rename : testing/web-platform/tests/tools/scripts/lint.whitelist => testing/web-platform/tests/tools/lint/lint.whitelist rename : testing/web-platform/tests/tools/scripts/_env.py => testing/web-platform/tests/tools/localpaths.py rename : testing/web-platform/tests/tools/scripts/manifest.py => testing/web-platform/tests/tools/manifest/manifest.py rename : testing/web-platform/tests/tools/scripts/manifest.py => testing/web-platform/tests/tools/manifest/tree.py rename : testing/web-platform/tests/serve.py => testing/web-platform/tests/tools/serve/serve.py
78 lines
2.2 KiB
Markdown
78 lines
2.2 KiB
Markdown
Web-platform-tests are designed to run in a self-contained environment
|
|
on the local computer. All the required resources are packaged with
|
|
the web-platform-tests repository.
|
|
|
|
## Requirements
|
|
|
|
* [git](http://git-scm.com/)
|
|
* [Python 2.7](http://python.org)
|
|
* [OpenSSL](https://www.openssl.org)
|
|
|
|
## Hosts configuration
|
|
|
|
The tests depend on certain domains being available. These are
|
|
typically configured locally with `web-platform.test` as the top level
|
|
domain and five subdomains. To configure these domains you need to edit
|
|
your
|
|
[`hosts` file](http://en.wikipedia.org/wiki/Hosts_%28file%29%23Location_in_the_file_system). 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
|
|
```
|
|
|
|
## Cloning the Repository
|
|
|
|
If you have not done so, clone the web-platform-tests repository:
|
|
|
|
git clone --recursive git@github.com:w3c/web-platform-tests.git
|
|
|
|
If you have already made a clone, but did not specify `--recursive`
|
|
update all submodules:
|
|
|
|
git submodule update --init --recursive
|
|
|
|
## Font Files
|
|
|
|
Many layout tests require a set of test-specific fonts, notably
|
|
Ahem. These are available from the
|
|
[CSS Fonts](http://www.w3.org/Style/CSS/Test/Fonts/) website. These
|
|
must be installed according to the normal font-install procedure for
|
|
your operating system.
|
|
|
|
## Running the Test Server
|
|
|
|
The test environment can be started using
|
|
|
|
./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"]
|
|
```
|
|
|
|
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"}}
|
|
```
|