Files
HTMLKit/HTMLKitTests/css-tests/27a.html
T
iska 94fed8afa1 Add CSS test fixtures
Tests are adapted from the official suite:
http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/static/flat/

Test file format:
Each test file is a HTML fragment with:

<script> element with id="selectors": contains a JSON array of several selector
definitions. Each selector definition has a selector string as input, a "match" array
of the expected matched IDs. Some selectors must fail with a parse error, such
selectors have an "error" key with the error location in the selector string.

<div> element with id="testDOM": contains the DOM fragment which should be
used to select the elements for each of the defined selectors.
2015-11-28 21:10:31 +01:00

62 lines
1.4 KiB
HTML

<script type="application/json" id="selectors">
[{
"selector": ":root:first-child",
"match": []
},
{
"selector": ":root:last-child",
"match": []
},
{
"selector": ":root:only-child",
"match": []
},
{
"selector": ":root:nth-child(1)",
"match": []
},
{
"selector": ":root:nth-child(n)",
"match": []
},
{
"selector": ":root:nth-last-child(1)",
"match": []
},
{
"selector": ":root:nth-last-child(n)",
"match": []
},
{
"selector": ":root:first-of-type",
"match": []
},
{
"selector": ":root:last-of-type",
"match": []
},
{
"selector": ":root:only-of-type",
"match": []
},
{
"selector": ":root:nth-of-type(1)",
"match": []
},
{
"selector": ":root:nth-of-type(n)",
"match": []
},
{
"selector": ":root:nth-last-of-type(1)",
"match": []
},
{
"selector": ":root:nth-last-of-type(n)",
"match": []
}]
</script>
<div id="testDOM">
<p id="1">This line should be green (there should be no red on this page).</p>
</div>