summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/docs/css-naming.md
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/docs/css-naming.md
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/docs/css-naming.md')
-rw-r--r--testing/web-platform/tests/docs/css-naming.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/testing/web-platform/tests/docs/css-naming.md b/testing/web-platform/tests/docs/css-naming.md
new file mode 100644
index 000000000..c508ac33f
--- /dev/null
+++ b/testing/web-platform/tests/docs/css-naming.md
@@ -0,0 +1,77 @@
+CSS tests require a specific naming convention. This is also a good,
+but not mandatory, style to use for other tests.
+
+## File Name
+
+The file name format is ```test-topic-###.ext``` where `test-topic`
+somewhat describes the test, `###` is a zero-filled number used to
+keep the file names unique, and `ext` is typically either
+`html` or `xht`.
+
+Test filenames must also be globally unique. There cannot be multiple
+tests with the same filename, even if they are in different parent
+directories. For example, having both
+`/css-values-3/foo-001.html` and `/css-variables-1/foo-001.html`
+would not be allowed. This restriction is in place because some tools
+that use the CSS tests dump all of the test files into a single
+directory, which would cause all but one of the tests with the same
+filename to be clobbered and accidentally skipped.
+
+### test-topic
+
+`test-topic` is a short identifier that describes the test. The
+`test-topic` should avoid conjunctions, articles, and prepositions.
+It is a file name, not an English phrase: it should be as concise
+as possible.
+
+Examples:
+```
+ margin-collapsing-###.ext
+ border-solid-###.ext
+ float-clear-###.ext
+```
+
+### `###`
+
+`###` is a zero-filled number used to keep the file names unique when
+files have the same test-topic name.
+
+Note: The number format is limited to 999 cases. If you go over this
+number it is recommended that you reevaluate your test-topic name.
+
+For example, in the case of margin-collapsing there are multiple
+cases so each case could have the same test-topic but different
+numbers:
+
+```
+ margin-collapsing-001.xht
+ margin-collapsing-002.xht
+ margin-collapsing-003.xht
+```
+
+There may also be a letter affixed after the number, which can be
+used to indicate variants of a test.
+
+For example, ```float-wrap-001l.xht``` and ```float-wrap-001r.xht```
+might be left and right variants of a float test.
+
+If tests using both the unsuffixed number and the suffixed number
+exist, the suffixed tests must be subsets of the unsuffixed test.
+
+For example, if ```bidi-004``` and ```bidi-004a``` both exist,
+```bidi-004a``` must be a subset of ```bidi-004```.
+
+If the unsuffixed test is strictly the union of the suffixed tests,
+i.e. covers all aspects of the suffixed tests (such that a user agent
+passing the unsuffixed test will, by design, pass all the suffixed
+tests), then the unsuffixed test should be marked with the combo flag.
+
+If ```bidi-004a``` and ```bidi-004b``` cover all aspects of ```bidi-
+004``` (except their interaction), then bidi-004 should be given the
+combo flag.
+
+### ext
+
+`ext` is the file extension or format of the file.
+For XHTML test files, it should be `xht`.
+For HTML (non-XML) test files, it should be `html`.