1CSS tests have some additional requirements for metadata.
2
3### Specification Links
4
5Specification Links
6
7``` html
8<link rel="help" href="RELEVANT_SPEC_SECTION" />
9```
10
11The specification link elements provide a way to align the test with
12information in the specification being tested.
13
14* Links should link to relevant sections within the specification
15* Use the anchors from the specification's Table of Contents
16* A test can have multiple specification links
17  * Always list the primary section that is being tested as the
18    first item in the list of specification links
19  * Order the list from the most used/specific to least used/specific
20  * There is no need to list common incidental features like the
21    color green if it is being used to validate the test unless the
22    case is specifically testing the color green
23* If the test is part of multiple test suites, link to the relevant
24  sections of each spec.
25
26Example 1:
27
28``` html
29<link rel="help"
30href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" />
31```
32
33Example 2:
34
35``` html
36<link rel="help"
37href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" />
38<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#q7" />
39<link rel="help"
40href="http://www.w3.org/TR/CSS21/visudet.html#line-height" />
41<link rel="help"
42href="http://www.w3.org/TR/CSS21/colors.html#background-properties" />
43```
44
45### Requirement Flags
46
47<table>
48<tr>
49  <th>Token</th>
50  <th>Description</th>
51</tr>
52<tr>
53  <td>ahem</td>
54  <td>Test requires
55  <a href="http://www.w3.org/Style/CSS/Test/Fonts/Ahem">Ahem font</a>
56  </td>
57</tr>
58<tr>
59  <td>animated</td>
60  <td>Test is animated in final state. (Cannot be verified using
61    reftests/screenshots.)</td>
62</tr>
63<tr>
64  <td>asis</td>
65  <td>The test has particular markup formatting requirements and
66    cannot be re-serialized.</td>
67</tr>
68<tr>
69  <td>combo</td>
70  <td>Test, which must have an unsuffixed filename number, is
71     strictly the union of all the suffixed tests with the same name
72     and number. (See File name format, below.)</td>
73</tr>
74<tr>
75  <td>dom</td>
76  <td>Requires support for JavaScript and the Document Object Model (
77    DOM)</td>
78</tr>
79<tr>
80  <td>font</td>
81  <td>Requires a specific font to be installed. (Details must be
82    provided and/or the font linked to in the test description)</td>
83</tr>
84<tr>
85  <td>history</td>
86  <td>User agent session history is required. Testing :visited is a
87    good example where this may be used.</td>
88</tr>
89<tr>
90  <td>HTMLonly</td>
91  <td>Test case is only valid for HTML</td>
92</tr>
93<tr>
94  <td>http</td>
95  <td>Requires HTTP headers</td>
96</tr>
97<tr>
98  <td>image</td>
99  <td>Requires support for bitmap graphics and the graphic to load
100  </td>
101</tr>
102<tr>
103  <td>interact</td>
104  <td>Requires human interaction (such as for testing scrolling
105    behavior)</td>
106</tr>
107<tr>
108  <td>invalid</td>
109  <td>Tests handling of invalid CSS. Note: This case contains CSS
110     properties and syntax that may not validate.</td>
111</tr>
112<tr>
113  <td>may</td>
114  <td>Behavior tested is preferred but OPTIONAL.
115  <a href="http://www.ietf.org/rfc/rfc2119.txt">[RFC2119]</a></td>
116</tr>
117<tr>
118  <td>namespace</td>
119  <td>Requires support for XML Namespaces</td>
120</tr>
121<tr>
122  <td>nonHTML</td>
123  <td>Test case is only valid for formats besides HTML (e.g. XHTML
124    or arbitrary XML)</td>
125</tr>
126<tr>
127  <td>paged</td>
128  <td>Only valid for paged media</td>
129</tr>
130<tr>
131  <td>scroll</td>
132  <td>Only valid for continuous (scrolling) media</td>
133</tr>
134<tr>
135  <td>should</td>
136  <td>Behavior tested is RECOMMENDED, but not REQUIRED. <a
137    href="http://www.ietf.org/rfc/rfc2119.txt">[RFC2119]</a></td>
138</tr>
139<tr>
140  <td>speech</td>
141  <td>Device supports audio output. Text-to-speech (TTS) engine
142    installed</td>
143</tr>
144<tr>
145  <td>svg</td>
146  <td>Requires support for vector graphics (SVG)</td>
147</tr>
148<tr>
149  <td>userstyle</td>
150  <td>Requires a user style sheet to be set</td>
151</tr>
152<tr>
153  <td>32bit</td>
154  <td>Assumes a 32-bit integer as the minimum (-2147483648) or
155    maximum (2147483647) value</td>
156</tr>
157<tr>
158  <td>96dpi</td>
159  <td>Assumes 96dpi display</td>
160</tr>
161</table>
162
163
164Example 1 (one token applies):
165``` html
166<meta name="flags" content="invalid" />
167```
168
169Example 2 (multiple tokens apply):
170
171``` html
172<meta name="flags" content="ahem image scroll" />
173```
174
175Example 3 (no tokens apply):
176
177``` html
178<meta name="flags" content="" />
179```
180
181### Test Assertions
182
183``` html
184<meta name="assert" content="TEST ASSERTION" />
185```
186
187This element should contain a complete detailed statement expressing
188what specifically the test is attempting to prove. If the assertion
189is only valid in certain cases, those conditions should be described
190in the statement.
191
192The assertion should not be:
193
194* A copy of the title text
195* A copy of the test verification instructions
196* A duplicate of another assertion in the test suite
197* A line or reference from the CSS specification unless that line is
198  a complete assertion when taken out of context.
199
200The test assertion is **optional**. It helps the reviewer understand
201the goal of the test so that he or she can make sure it is being
202tested correctly. Also, in case a problem is found with the test
203later, the testing method (e.g. using `color` to determine pass/fail)
204can be changed (e.g. to using `background-color`) while preserving
205the intent of the test (e.g. testing support for ID selectors).
206
207Examples of good test assertions:
208
209* "This test checks that a background image with no intrinsic size
210   covers the entire padding box."
211* "This test checks that 'word-spacing' affects each space (U+0020)
212  and non-breaking space (U+00A0)."
213* "This test checks that if 'top' and 'bottom' offsets are specified
214  on an absolutely-positioned replaced element, then any remaining
215  space is split amongst the 'auto' vertical margins."
216* "This test checks that 'text-indent' affects only the first line
217  of a block container if that line is also the first formatted line
218  of an element."
219