mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1265001 part 2 - Add some tests with uppercase N in An+B.
This commit is contained in:
parent
a41484d473
commit
fd41a201a0
43
layout/reftests/css-selectors/nth-child-1.html
Normal file
43
layout/reftests/css-selectors/nth-child-1.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests :nth-child(An+B) matching</title>
|
||||
<style type="text/css">
|
||||
|
||||
div :nth-child(+/**/3n-2) { color:white; }
|
||||
div :nth-child(+3n/**/-2) { background-color:black; }
|
||||
div :nth-child(+3n/**/-2) { font-size:12px; }
|
||||
div :nth-child(+3n-/**/2) { text-decoration: underline; }
|
||||
div :nth-child(+3n-2/**/) { border-left-width: 1px; }
|
||||
div :nth-child(+3/**/n-2) { border-right-width: 1px; }
|
||||
div :nth-child(+3n/**/-2) { border-top-width: 1px; }
|
||||
div :nth-child(+3n/**/-2) { border-bottom-width: 1px; }
|
||||
div :nth-child(+3n-/**/2) { border-style: solid; }
|
||||
div :nth-child(+3n-2/**/) { border-color: blue; }
|
||||
|
||||
/* valid but will not match anything */
|
||||
div :nth-child(-/**/n-2) { color:red; }
|
||||
div :nth-child(-n/**/-2) { color:red; }
|
||||
div :nth-child(-n/**/-2) { color:red; }
|
||||
div :nth-child(-n-/**/2) { color:red; }
|
||||
div :nth-child(-n-2/**/) { color:red; }
|
||||
div :nth-child(-1/**/n-2) { color:red; }
|
||||
div :nth-child(-1n/**/-2) { color:red; }
|
||||
div :nth-child(-1n/**/-2) { color:red; }
|
||||
div :nth-child(-1n-/**/2) { color:red; }
|
||||
div :nth-child(-1n-2/**/) { color:red; }
|
||||
|
||||
/* invalid */
|
||||
div :nth-child(-/**/ n-2) { color:red; }
|
||||
div :nth-child(- /**/n-2) { color:red; }
|
||||
div :nth-child(+/**/ n-2) { color:red; }
|
||||
div :nth-child(+ /**/n-2) { color:red; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x></div>
|
||||
|
||||
</body>
|
||||
</html>
|
43
layout/reftests/css-selectors/nth-child-2.html
Normal file
43
layout/reftests/css-selectors/nth-child-2.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests :nth-child(An+B) matching</title>
|
||||
<style type="text/css">
|
||||
|
||||
div :nth-child(+/**/3N-2) { color:white; }
|
||||
div :nth-child(+3N/**/-2) { background-color:black; }
|
||||
div :nth-child(+3N/**/-2) { font-size:12px; }
|
||||
div :nth-child(+3N-/**/2) { text-decoration: underline; }
|
||||
div :nth-child(+3N-2/**/) { border-left-width: 1px; }
|
||||
div :nth-child(+3/**/N-2) { border-right-width: 1px; }
|
||||
div :nth-child(+3N/**/-2) { border-top-width: 1px; }
|
||||
div :nth-child(+3N/**/-2) { border-bottom-width: 1px; }
|
||||
div :nth-child(+3N-/**/2) { border-style: solid; }
|
||||
div :nth-child(+3N-2/**/) { border-color: blue; }
|
||||
|
||||
/* valid but will not match anything */
|
||||
div :nth-child(-/**/N-2) { color:red; }
|
||||
div :nth-child(-N/**/-2) { color:red; }
|
||||
div :nth-child(-N/**/-2) { color:red; }
|
||||
div :nth-child(-N-/**/2) { color:red; }
|
||||
div :nth-child(-N-2/**/) { color:red; }
|
||||
div :nth-child(-1/**/N-2) { color:red; }
|
||||
div :nth-child(-1N/**/-2) { color:red; }
|
||||
div :nth-child(-1N/**/-2) { color:red; }
|
||||
div :nth-child(-1N-/**/2) { color:red; }
|
||||
div :nth-child(-1N-2/**/) { color:red; }
|
||||
|
||||
/* invalid */
|
||||
div :nth-child(-/**/ N-2) { color:red; }
|
||||
div :nth-child(- /**/N-2) { color:red; }
|
||||
div :nth-child(+/**/ N-2) { color:red; }
|
||||
div :nth-child(+ /**/N-2) { color:red; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x><x>x</x></div>
|
||||
|
||||
</body>
|
||||
</html>
|
25
layout/reftests/css-selectors/nth-child-ref.html
Normal file
25
layout/reftests/css-selectors/nth-child-ref.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests :nth-child(An+B) matching</title>
|
||||
<style type="text/css">
|
||||
|
||||
x { color:white; }
|
||||
x { background-color:black; }
|
||||
x { font-size:12px; }
|
||||
x { text-decoration: underline; }
|
||||
x { border-left-width: 1px; }
|
||||
x { border-right-width: 1px; }
|
||||
x { border-top-width: 1px; }
|
||||
x { border-bottom-width: 1px; }
|
||||
x { border-style: solid; }
|
||||
x { border-color: blue; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div><x>x</x><y>x</y><y>x</y><x>x</x><y>x</y><y>x</y><x>x</x><y>x</y><y>x</y><x>x</x><y>x</y></div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -2,3 +2,5 @@
|
||||
== attr-case-insensitive-1.html attr-case-insensitive-1-ref.html
|
||||
skip-if((B2G&&browserIsRemote)||Mulet) == sibling-combinators-on-anon-content-1.xhtml sibling-combinators-on-anon-content-ref.xhtml # Initial mulet triage: parity with B2G/B2G Desktop
|
||||
skip-if((B2G&&browserIsRemote)||Mulet) == sibling-combinators-on-anon-content-2.xhtml sibling-combinators-on-anon-content-ref.xhtml # Initial mulet triage: parity with B2G/B2G Desktop
|
||||
== nth-child-1.html nth-child-ref.html
|
||||
== nth-child-2.html nth-child-ref.html
|
||||
|
@ -640,6 +640,30 @@ function run() {
|
||||
test_balanced_unparseable(":nth-child(- /**/n-2)");
|
||||
test_balanced_unparseable(":nth-child(+/**/ n-2)");
|
||||
test_balanced_unparseable(":nth-child(+ /**/n-2)");
|
||||
test_parseable(":nth-child(+/**/N-2)");
|
||||
test_parseable(":nth-child(+N/**/-2)");
|
||||
test_parseable(":nth-child(+N/**/-2)");
|
||||
test_parseable(":nth-child(+N-/**/2)");
|
||||
test_parseable(":nth-child(+N-2/**/)");
|
||||
test_parseable(":nth-child(+1/**/N-2)");
|
||||
test_parseable(":nth-child(+1N/**/-2)");
|
||||
test_parseable(":nth-child(+1N/**/-2)");
|
||||
test_parseable(":nth-child(+1N-/**/2)");
|
||||
test_parseable(":nth-child(+1N-2/**/)");
|
||||
test_parseable(":nth-child(-/**/N-2)");
|
||||
test_parseable(":nth-child(-N/**/-2)");
|
||||
test_parseable(":nth-child(-N/**/-2)");
|
||||
test_parseable(":nth-child(-N-/**/2)");
|
||||
test_parseable(":nth-child(-N-2/**/)");
|
||||
test_parseable(":nth-child(-1/**/N-2)");
|
||||
test_parseable(":nth-child(-1N/**/-2)");
|
||||
test_parseable(":nth-child(-1N/**/-2)");
|
||||
test_parseable(":nth-child(-1N-/**/2)");
|
||||
test_parseable(":nth-child(-1N-2/**/)");
|
||||
test_balanced_unparseable(":nth-child(-/**/ N-2)");
|
||||
test_balanced_unparseable(":nth-child(- /**/N-2)");
|
||||
test_balanced_unparseable(":nth-child(+/**/ N-2)");
|
||||
test_balanced_unparseable(":nth-child(+ /**/N-2)");
|
||||
test_parseable(":nth-child( +n + 1 )");
|
||||
test_parseable(":nth-child( +/**/n + 1 )");
|
||||
test_parseable(":nth-child( -/**/2/**/n/**/+/**/4 )");
|
||||
|
Loading…
Reference in New Issue
Block a user