[css-color-4] Add some decimals to ensure <number> parsing, not just <integer>
10 files changed
tree: 09cf9e7de7c8d1c6b9c72a108f7f266c9c896c3f
  1. compositing-1/
  2. css-align-3/
  3. css-animations-1/
  4. css-backgrounds-3/
  5. css-box-3/
  6. css-break-3/
  7. css-cascade-3/
  8. css-cascade-4/
  9. css-color-3/
  10. css-color-4/
  11. css-conditional-3/
  12. css-counter-styles-3/
  13. css-display-3/
  14. css-exclusions-1/
  15. css-flexbox-1/
  16. css-fonts-3/
  17. css-gcpm-3/
  18. css-grid-1/
  19. css-images-3/
  20. css-lists-3/
  21. css-logical-properties-1/
  22. css-masking-1/
  23. css-multicol-1/
  24. css-namespaces-3/
  25. css-page-3/
  26. css-pseudo-4/
  27. css-regions-1/
  28. css-rhythm-1/
  29. css-round-display/
  30. css-ruby-1/
  31. css-scoping-1/
  32. css-shapes-1/
  33. css-speech-1/
  34. css-style-attr-1/
  35. css-syntax-3/
  36. css-tables-3/
  37. css-text-3/
  38. css-text-decor-3/
  39. css-transforms-1/
  40. css-transitions-1/
  41. css-transitions-2/
  42. css-ui-3/
  43. css-values-3/
  44. css-values-4/
  45. css-variables-1/
  46. css-writing-modes-3/
  47. css1/
  48. css21/
  49. cssom-1/
  50. cssom-view-1/
  51. filters-1/
  52. fonts/
  53. geometry-1/
  54. mediaqueries-3/
  55. reference/
  56. selectors-3/
  57. selectors-4/
  58. support/
  59. tools/
  60. vendor-imports/
  61. WOFF2-UserAgent/
  62. work-in-progress/
  63. .gitignore
  64. .gitmodules
  65. .hgignore
  66. .hgsub
  67. .hgsubstate
  68. .htaccess
  69. .travis.yml
  70. build-css-testsuites.sh
  71. config.default.json
  72. CONTRIBUTING.md
  73. LICENSE.md
  74. lint
  75. lint.whitelist
  76. manifest
  77. README.md
  78. requirements.txt
  79. serve
  80. serve.py
README.md

W3C CSS Test Suite Repository

This repository contains top level directories for all of CSS specs for which we currently have tests. Place tests in the appropriate directory based on the first rel=“help” link in the test. If you are writing tests for a spec and it doesn't yet have a directory here, feel free to create it.

There are a few directories that do not map to specifications:

support/ contains common image files to which many of the tests link in this location

tools/ is random scripts that may be useful when administering tests.

vendor-imports/ is where third parties may import their tests that originate and are maintained in an external repo. Files in this directory should never be modified in this repo, but should go through the vendor's process to be imported here.

work-in-progress/ is a legacy directory that contains all the work that was once submitted to the repo, but was not yet ready for review. Since the CSSWG has adopted the GitHub pull request process, no new files should be landed here. The subdirectories here are named by test author or contributing organization.

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). You will also need a copy of OpenSSL. Users on Windows should read the Windows Notes section below.

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   csswg.test
127.0.0.1   www.csswg.test
127.0.0.1   www1.csswg.test
127.0.0.1   www2.csswg.test
127.0.0.1   xn--n8j6ds53lwwkrqhv28a.csswg.test
127.0.0.1   xn--lve-6lad.csswg.test
0.0.0.0     nonexistent-origin.csswg.test

Because csswg-test 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

./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"}}

Windows Notes

Running wptserve with SSL enabled on Windows typically requires installing an OpenSSL distribution. Shining Light provide a convenient installer that is known to work, but requires a little extra setup.

After installation ensure that the path to OpenSSL is on your %Path% environment variable.

Then set the path to the default OpenSSL configuration file (usually something like C:\OpenSSL-Win32\bin\openssl.cfg in the server configuration. To do this copy config.default.json in the web-platform-tests root to config.json. Then edit the JSON so that the key ssl/openssl/base_conf_path has a value that is the path to the OpenSSL config file.

Linking Your Tests to Specifications

In addition to placing your tests in the appropriate directory in this repository, you must also include at least one specification link in the test metadata, following these guidelines.

For CSS tests, you must also be sure you’re linking to a specific level of the spec, generally the first level where the feature being tested is defined. Where possible, it’s preferable to link to the official version of the spec, which will start with https://www.w3.org/TR/. This can usually be found as the ‘Latest version’ link in the spec itself and will include the level of the spec in the URL. For example, the proper link to level 1 of the CSS Flexbox spec is:

https://www.w3.org/TR/css-flexbox-1/#RELEVANT_SECTION

When testing features not yet available in an official draft, link to the appropriate Editor’s Draft found at https://drafts.csswg.org/. Be sure to include the level of the specification in the link. For example, the proper link to the CSS Flexbox Level 1 Editor’s Draft is:

https://drafts.csswg.org/css-flexbox-1/#RELEVANT_SECTION

Contributing

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.

Getting Involved

If you wish to contribute actively, you're very welcome to join the public-css-testsuite@w3.org mailing list by signing up to our mailing list. The mailing list is archived.

Write Access

This section only applies if you have cloned the repository from Mercurial. If you've cloned it from GitHub, which is a mirror of the canonical Mercurial repo, you can submit your tests via a pull request.

To gain write access to this Mercurial repository, sign up for an account on the CSS Test Suite Manager (aka Shepherd) at: https://test.csswg.org/shepherd/register and then submit a request on the Repository Access page at: https://test.csswg.org/shepherd/account/access/

You will be notified by email when your request is processed.

Please note that although we will grant write access directly to the Mercurial repo, it is strongly advised to use GitHub for test submissions to enable reviewers to use its built-in review tools. Direct submissions to Mercurial should be limited to administrative or housekeeping tasks, very minor changes that don't require a review, or from advanced users of the system.