gecko-dev/testing/web-platform/tests
James Graham 174983d7b3 Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly
--HG--
rename : testing/web-platform/tests/dom/nodes/Document-createComment.html => testing/web-platform/tests/dom/nodes/Document-createTextNode.html
rename : testing/web-platform/tests/selectors-api/tests/submissions/Opera/level2-baseline.html => testing/web-platform/tests/selectors-api/tests/submissions/Opera/Element-matches.html
rename : testing/web-platform/tests/selectors-api/tests/submissions/Opera/level2-baseline.html => testing/web-platform/tests/selectors-api/tests/submissions/Opera/ParentNode-find-findAll.html
rename : testing/web-platform/tests/selectors-api/tests/submissions/Opera/level2-lib.js => testing/web-platform/tests/selectors-api/tests/submissions/Opera/ParentNode-find-findAll.js
2014-11-24 12:56:30 +00:00
..
2dcontext
DOMEvents Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
FileAPI
IndexedDB Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
WebCryptoAPI
WebIDL
XMLHttpRequest Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
ambient-light
animation-timing
app-uri
battery-status
common
conformance-checkers Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
content-security-policy
cors
custom-elements Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
docs Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
dom Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
domparsing
domxpath
encoding Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
eventsource Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents
fonts
geolocation-API
hr-time
html Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
html-imports
html-longdesc
html-media-capture
http
images
js/builtins
media
media-source Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
mediacapture-streams
microdata
navigation-timing
notifications
old-tests/submission
page-visibility
performance-timeline
pointerevents Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
pointerlock
progress-events Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
proximity
quirks-mode
resource-timing Bug 1097230 - Update web-platform-tests to revision 9840b559b10e05f659932a835c11832db9e01c42, a=testonly 2014-11-20 16:30:01 +00:00
resources Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
selectors/attribute-selectors/attribute-case
selectors-api/tests/submissions/Opera Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
service-workers Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
shadow-dom
tools Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
touch-events
typedarrays
url Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
user-timing
vibration Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
web-animations Bug 1097230 - Update web-platform-tests to revision 9840b559b10e05f659932a835c11832db9e01c42, a=testonly 2014-11-20 16:30:01 +00:00
webaudio
webdriver Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
webgl
webmessaging
webrtc
websockets Bug 1097230 - Update web-platform-tests to revision 9840b559b10e05f659932a835c11832db9e01c42, a=testonly 2014-11-20 16:30:01 +00:00
webstorage
webvtt
workers Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
.gitignore
.gitmodules
.travis.yml
CONTRIBUTING.md
LICENSE Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
README.md
config.default.json Bug 1084367 - Upgrade wptrunner to 1.4 and web-platform-tests to 1b45197f111e5bb65607d89f7d385883849d005d, a=test-only 2014-10-21 14:21:57 +01:00
serve.py Bug 1103906 - Update web-platform-tests to revision 551060ba2eb3fa6d1c713c179d52fdf1132ea50c, a=testonly 2014-11-24 12:56:30 +00:00
server-side.md
testharness_runner.html

README.md

Description

This is the test suites from a number of W3C Working Groups, including the HTML Working Group, the Web Apps Working Group, the Device APIs Working Group, and the Web Apps Security Working Group.

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).

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

Because web-platform-tests uses git submodules, you must ensure that these are up to date. In the root of your checkout, run:

git submodule update --init --recursive

The test environment can then be started using

python serve.py

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, edit the config.json file, for example, replacing the part that reads:

"http": [8000, "auto"]

to some port of your choice e.g.

"http":[1234, "auto"]

Test Runner

There is a test runner that is designed to provide a convenient way to run the web-platform tests in-browser. It will run testharness.js tests automatically but requires manual work for reftests and manual tests.

In order to use the runner, it is first necessary to generate a test manifest. This must be called MANIFEST.json and placed in the web-platform-tests root.

You must do this step to use the test runner, even if you are not creating a new test suite.

To generate this file, from a command prompt at the root directory of the repo, run:

python tools/scripts/manifest.py

This tools/scripts/manifest.py needs python html5lib package. If you have not installed it yet, run:

pip install html5lib

On Mac OS X, python is installed with Xcode, but pip is not. Try

sudo easy_install pip

if pip is not already on your system.

Running the tests requires that the test environment be activated as described above. The runner can be found at /tools/runner/index.html on the local server i.e.

http://web-platform.test:8000/tools/runner/index.html

in the default configuration.

Publication

The master branch is automatically synced to http://w3c-test.org/.

Pull requests that have been checked are automatically mirrored to http://w3c-test.org/submissions/.

Finding Things

Each top-level directory represents a W3C specification: the name matches the shortname used after the canonical address of the said specification under http://www.w3.org/TR/ .

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.

If you're looking at a section of the specification and can't figure out where the directory is for it in the tree, just run:

node tools/scripts/id2path.js your-id

Branches

In the vast majority of cases the only branch that you should need to care about is master.

There is another branch called CR. This is a strict subset of master that is limited to features that are found in the Candidate Recommendation version of the relevant specifications.

If you see other branches in the repository, you can generally safely ignore them. Please note that branches prefixed with temp/ are temporary branches and can get deleted at some point. So don't base any work off them unless you want to see your work destroyed.

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 your-name/topic;
  • make your changes;
  • push that to your repo;
  • and send in a pull request based on the above.

Please make your pull requests either to master or to a feature branch (but not to CR).

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.

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.

Join us on irc #testing (irc.w3.org, port 6665). The channel is archived.

Documentation