<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173698] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173698">173698</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2014-09-17 13:03:14 -0700 (Wed, 17 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add parsing for :nth-child(An+B of selector)
https://bugs.webkit.org/show_bug.cgi?id=136845
Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-09-17
Reviewed by Antti Koivisto.
Source/WebCore:
Add support for parsing :nth-child(of). The implementation of selector matching
will be in a follow up, there are enough edge cases here already.
Spec here: http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo
Test: fast/css/parsing-css-nth-child-of.html
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
(WebCore::CSSParser::realLex):
The parser generate two new kinds of tokens:
-NTHCHILDFUNCTION, matching the "nth-child" identifier.
-NTHCHILDSELECTORSEPARATOR, matching the "of" keyword separating An+B from the selector list.
NTHCHILDFUNCTION is used to extend the new syntax only for :nth-child() and not all the "nth" functions
(e.g. :nth-of-type()).
NTHCHILDSELECTORSEPARATOR exists for two reasons:
-We must clear the "parsingMode" before parsing selectorList. If we failed to do that, the complex selectors
would be parsed in NthChildMode, which has all kind of bad side effects.
-The second reason is differentiacting "of" for all the other identifiers. Arguably, this could have been done
in the grammar, but it is clearer this way since we already need the branches for the parsingMode.
* css/CSSGrammar.y.in:
Those are pretty much duplicates of the existing FUNCTION rules but supporting the new syntax.
* css/CSSParserValues.cpp:
(WebCore::selectorListMatchesPseudoElement):
(WebCore::CSSParserSelector::matchesPseudoElement):
Matching pseudo elements does not make much sense for those selectorList (e.g. :nth-child(2n of ::before)).
Add helper function to fail parsing of those cases.
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::selectorList):
Updated serialization code for CSS OM.
LayoutTests:
* fast/css/parsing-css-nth-child-of-expected.txt: Added.
* fast/css/parsing-css-nth-child-of.html: Added.
Two new tests to cover the new syntax.
* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
The usual tests for CSS OM.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcsscssselectortextexpectedtxt">trunk/LayoutTests/fast/css/css-selector-text-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsscssselectortexthtml">trunk/LayoutTests/fast/css/css-selector-text.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscsssetselectortextexpectedtxt">trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcsscsssetselectortexthtml">trunk/LayoutTests/fast/css/css-set-selector-text.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/css/CSSGrammar.y.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserValuescpp">trunk/Source/WebCore/css/CSSParserValues.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserValuesh">trunk/Source/WebCore/css/CSSParserValues.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSSelectorcpp">trunk/Source/WebCore/css/CSSSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSSelectorh">trunk/Source/WebCore/css/CSSSelector.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssparsingcssnthchildofexpectedtxt">trunk/LayoutTests/fast/css/parsing-css-nth-child-of-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsingcssnthchildofhtml">trunk/LayoutTests/fast/css/parsing-css-nth-child-of.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/LayoutTests/ChangeLog        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2014-09-17 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><ins>+ Add parsing for :nth-child(An+B of selector)
+ https://bugs.webkit.org/show_bug.cgi?id=136845
+
+ Reviewed by Antti Koivisto.
+
+ * fast/css/parsing-css-nth-child-of-expected.txt: Added.
+ * fast/css/parsing-css-nth-child-of.html: Added.
+ Two new tests to cover the new syntax.
+
+ * fast/css/css-selector-text-expected.txt:
+ * fast/css/css-selector-text.html:
+ * fast/css/css-set-selector-text-expected.txt:
+ * fast/css/css-set-selector-text.html:
+ The usual tests for CSS OM.
+
+2014-09-17 Benjamin Poulain <bpoulain@apple.com>
+
</ins><span class="cx"> CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=136807
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscssselectortextexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/css-selector-text-expected.txt (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/css-selector-text-expected.txt        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/LayoutTests/fast/css/css-selector-text-expected.txt        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -60,6 +60,28 @@
</span><span class="cx"> PASS parseThenSerializeRule(':-webkit-autofill { }') is ':-webkit-autofill { }'
</span><span class="cx"> PASS parseThenSerializeRule(':-webkit-drag { }') is ':-webkit-drag { }'
</span><span class="cx">
</span><ins>+PASS parseThenSerializeRule(':nth-child(odd) { }') is ':nth-child(odd) { }'
+PASS parseThenSerializeRule(':nth-child(even) { }') is ':nth-child(even) { }'
+PASS parseThenSerializeRule(':nth-child(n) { }') is ':nth-child(n) { }'
+PASS parseThenSerializeRule(':nth-child(-n) { }') is ':nth-child(-n) { }'
+PASS parseThenSerializeRule(':nth-child(5) { }') is ':nth-child(5) { }'
+PASS parseThenSerializeRule(':nth-child(-5) { }') is ':nth-child(-5) { }'
+PASS parseThenSerializeRule(':nth-child(5n+7) { }') is ':nth-child(5n+7) { }'
+PASS parseThenSerializeRule(':nth-child(-5n+7) { }') is ':nth-child(-5n+7) { }'
+PASS parseThenSerializeRule(':nth-child(5n-7) { }') is ':nth-child(5n-7) { }'
+PASS parseThenSerializeRule(':nth-child(-5n-7) { }') is ':nth-child(-5n-7) { }'
+
+PASS parseThenSerializeRule(':nth-child(odd of .foo, :nth-child(odd)) { }') is ':nth-child(odd of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(even of .foo, :nth-child(odd)) { }') is ':nth-child(even of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(n of .foo, :nth-child(odd)) { }') is ':nth-child(n of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(-n of .foo, :nth-child(odd)) { }') is ':nth-child(-n of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(5 of .foo, :nth-child(odd)) { }') is ':nth-child(5 of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(-5 of .foo, :nth-child(odd)) { }') is ':nth-child(-5 of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(5n+7 of .foo, :nth-child(odd)) { }') is ':nth-child(5n+7 of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(-5n+7 of .foo, :nth-child(odd)) { }') is ':nth-child(-5n+7 of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(5n-7 of .foo, :nth-child(odd)) { }') is ':nth-child(5n-7 of .foo, :nth-child(odd)) { }'
+PASS parseThenSerializeRule(':nth-child(-5n-7 of .foo, :nth-child(odd)) { }') is ':nth-child(-5n-7 of .foo, :nth-child(odd)) { }'
+
</ins><span class="cx"> PASS parseThenSerializeRule('::-webkit-file-upload-button { }') is '*::-webkit-file-upload-button { }'
</span><span class="cx"> PASS parseThenSerializeRule('::-webkit-search-cancel-button { }') is '*::-webkit-search-cancel-button { }'
</span><span class="cx"> PASS parseThenSerializeRule('::-webkit-search-decoration { }') is '*::-webkit-search-decoration { }'
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscssselectortexthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/css-selector-text.html (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/css-selector-text.html        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/LayoutTests/fast/css/css-selector-text.html        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -99,6 +99,32 @@
</span><span class="cx">
</span><span class="cx"> debug('');
</span><span class="cx">
</span><ins>+testSelectorRoundTrip(":nth-child(odd)");
+testSelectorRoundTrip(":nth-child(even)");
+testSelectorRoundTrip(":nth-child(n)");
+testSelectorRoundTrip(":nth-child(-n)");
+testSelectorRoundTrip(":nth-child(5)");
+testSelectorRoundTrip(":nth-child(-5)");
+testSelectorRoundTrip(":nth-child(5n+7)");
+testSelectorRoundTrip(":nth-child(-5n+7)");
+testSelectorRoundTrip(":nth-child(5n-7)");
+testSelectorRoundTrip(":nth-child(-5n-7)");
+
+debug('');
+
+testSelectorRoundTrip(":nth-child(odd of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(even of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(n of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-n of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5n+7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5n+7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5n-7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5n-7 of .foo, :nth-child(odd))");
+
+debug('');
+
</ins><span class="cx"> shouldBe("parseThenSerializeRule('::-webkit-file-upload-button { }')", "'*::-webkit-file-upload-button { }'");
</span><span class="cx"> shouldBe("parseThenSerializeRule('::-webkit-search-cancel-button { }')", "'*::-webkit-search-cancel-button { }'");
</span><span class="cx"> shouldBe("parseThenSerializeRule('::-webkit-search-decoration { }')", "'*::-webkit-search-decoration { }'");
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscsssetselectortextexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/LayoutTests/fast/css/css-set-selector-text-expected.txt        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -70,6 +70,28 @@
</span><span class="cx"> PASS setThenReadSelectorText(':-webkit-autofill') is ':-webkit-autofill'
</span><span class="cx"> PASS setThenReadSelectorText(':-webkit-drag') is ':-webkit-drag'
</span><span class="cx">
</span><ins>+PASS setThenReadSelectorText(':nth-child(odd)') is ':nth-child(odd)'
+PASS setThenReadSelectorText(':nth-child(even)') is ':nth-child(even)'
+PASS setThenReadSelectorText(':nth-child(n)') is ':nth-child(n)'
+PASS setThenReadSelectorText(':nth-child(-n)') is ':nth-child(-n)'
+PASS setThenReadSelectorText(':nth-child(5)') is ':nth-child(5)'
+PASS setThenReadSelectorText(':nth-child(-5)') is ':nth-child(-5)'
+PASS setThenReadSelectorText(':nth-child(5n+7)') is ':nth-child(5n+7)'
+PASS setThenReadSelectorText(':nth-child(-5n+7)') is ':nth-child(-5n+7)'
+PASS setThenReadSelectorText(':nth-child(5n-7)') is ':nth-child(5n-7)'
+PASS setThenReadSelectorText(':nth-child(-5n-7)') is ':nth-child(-5n-7)'
+
+PASS setThenReadSelectorText(':nth-child(odd of .foo, :nth-child(odd))') is ':nth-child(odd of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(even of .foo, :nth-child(odd))') is ':nth-child(even of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(n of .foo, :nth-child(odd))') is ':nth-child(n of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(-n of .foo, :nth-child(odd))') is ':nth-child(-n of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(5 of .foo, :nth-child(odd))') is ':nth-child(5 of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(-5 of .foo, :nth-child(odd))') is ':nth-child(-5 of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(5n+7 of .foo, :nth-child(odd))') is ':nth-child(5n+7 of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(-5n+7 of .foo, :nth-child(odd))') is ':nth-child(-5n+7 of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(5n-7 of .foo, :nth-child(odd))') is ':nth-child(5n-7 of .foo, :nth-child(odd))'
+PASS setThenReadSelectorText(':nth-child(-5n-7 of .foo, :nth-child(odd))') is ':nth-child(-5n-7 of .foo, :nth-child(odd))'
+
</ins><span class="cx"> PASS setThenReadSelectorText('::-webkit-file-upload-button') is '*::-webkit-file-upload-button'
</span><span class="cx"> PASS setThenReadSelectorText('::-webkit-search-cancel-button') is '*::-webkit-search-cancel-button'
</span><span class="cx"> PASS setThenReadSelectorText('::-webkit-search-decoration') is '*::-webkit-search-decoration'
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscsssetselectortexthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/css-set-selector-text.html (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/css-set-selector-text.html        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/LayoutTests/fast/css/css-set-selector-text.html        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -116,6 +116,31 @@
</span><span class="cx">
</span><span class="cx"> debug('');
</span><span class="cx">
</span><ins>+testSelectorRoundTrip(":nth-child(odd)");
+testSelectorRoundTrip(":nth-child(even)");
+testSelectorRoundTrip(":nth-child(n)");
+testSelectorRoundTrip(":nth-child(-n)");
+testSelectorRoundTrip(":nth-child(5)");
+testSelectorRoundTrip(":nth-child(-5)");
+testSelectorRoundTrip(":nth-child(5n+7)");
+testSelectorRoundTrip(":nth-child(-5n+7)");
+testSelectorRoundTrip(":nth-child(5n-7)");
+testSelectorRoundTrip(":nth-child(-5n-7)");
+
+debug('');
+
+testSelectorRoundTrip(":nth-child(odd of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(even of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(n of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-n of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5n+7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5n+7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(5n-7 of .foo, :nth-child(odd))");
+testSelectorRoundTrip(":nth-child(-5n-7 of .foo, :nth-child(odd))");
+debug('');
+
</ins><span class="cx"> shouldBe("setThenReadSelectorText('::-webkit-file-upload-button')", "'*::-webkit-file-upload-button'");
</span><span class="cx"> shouldBe("setThenReadSelectorText('::-webkit-search-cancel-button')", "'*::-webkit-search-cancel-button'");
</span><span class="cx"> shouldBe("setThenReadSelectorText('::-webkit-search-decoration')", "'*::-webkit-search-decoration'");
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingcssnthchildofexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-css-nth-child-of-expected.txt (0 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-css-nth-child-of-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-nth-child-of-expected.txt        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -0,0 +1,2849 @@
</span><ins>+Test the parsing of :nth-child(of) for querySelector and style.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Basic valid cases without [of selectors]
+PASS document.querySelector(":nth-child(even)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even)"
+PASS document.querySelector(":nth-child(odd)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd)"
+PASS document.querySelector(":nth-child(n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n)"
+PASS document.querySelector(":nth-child(-n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n)"
+PASS document.querySelector(":nth-child(3)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3)"
+PASS document.querySelector(":nth-child(-3)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3)"
+PASS document.querySelector(":nth-child(n+0)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0)"
+PASS document.querySelector(":nth-child(n-0)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0)"
+PASS document.querySelector(":nth-child(0n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n)"
+PASS document.querySelector(":nth-child(3n+5)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5)"
+PASS document.querySelector(":nth-child(-3n+5)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5)"
+PASS document.querySelector(":nth-child(3n-5)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5)"
+PASS document.querySelector(":nth-child(-3n-5)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5)"
+Basic cases with [of selectors]
+PASS document.querySelector(":nth-child(even of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of *)"
+PASS document.querySelector(":nth-child(even of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of *)"
+PASS document.querySelector(":nth-child(even of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of foobar)"
+PASS document.querySelector(":nth-child(even of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of foobar)"
+PASS document.querySelector(":nth-child(even of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of #id)"
+PASS document.querySelector(":nth-child(even of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of #id)"
+PASS document.querySelector(":nth-child(even of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .class)"
+PASS document.querySelector(":nth-child(even of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .class)"
+PASS document.querySelector(":nth-child(even of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of :first-child)"
+PASS document.querySelector(":nth-child(even of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of :first-child)"
+PASS document.querySelector(":nth-child(even of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of :last-child)"
+PASS document.querySelector(":nth-child(even of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of :last-child)"
+PASS document.querySelector(":nth-child(even of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of foobar#id.class)"
+PASS document.querySelector(":nth-child(even of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of foobar#id.class)"
+PASS document.querySelector(":nth-child(even of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(even of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(even of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of #id:empty)"
+PASS document.querySelector(":nth-child(even of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of #id:empty)"
+PASS document.querySelector(":nth-child(even of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a > b)"
+PASS document.querySelector(":nth-child(even of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a > b)"
+PASS document.querySelector(":nth-child(even of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a b)"
+PASS document.querySelector(":nth-child(even of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a b)"
+PASS document.querySelector(":nth-child(even of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a + b)"
+PASS document.querySelector(":nth-child(even of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a + b)"
+PASS document.querySelector(":nth-child(even of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a ~ b)"
+PASS document.querySelector(":nth-child(even of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a ~ b)"
+PASS document.querySelector(":nth-child(even of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(even of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(even of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, a)"
+PASS document.querySelector(":nth-child(even of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, a)"
+PASS document.querySelector(":nth-child(even of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, b)"
+PASS document.querySelector(":nth-child(even of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, b)"
+PASS document.querySelector(":nth-child(even of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, b, c, d)"
+PASS document.querySelector(":nth-child(even of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a, b, c, d)"
+PASS document.querySelector(":nth-child(even of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(even of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(even of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(even of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(odd of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of *)"
+PASS document.querySelector(":nth-child(odd of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of *)"
+PASS document.querySelector(":nth-child(odd of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of foobar)"
+PASS document.querySelector(":nth-child(odd of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of foobar)"
+PASS document.querySelector(":nth-child(odd of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of #id)"
+PASS document.querySelector(":nth-child(odd of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of #id)"
+PASS document.querySelector(":nth-child(odd of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .class)"
+PASS document.querySelector(":nth-child(odd of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .class)"
+PASS document.querySelector(":nth-child(odd of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of :first-child)"
+PASS document.querySelector(":nth-child(odd of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of :first-child)"
+PASS document.querySelector(":nth-child(odd of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of :last-child)"
+PASS document.querySelector(":nth-child(odd of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of :last-child)"
+PASS document.querySelector(":nth-child(odd of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of foobar#id.class)"
+PASS document.querySelector(":nth-child(odd of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of foobar#id.class)"
+PASS document.querySelector(":nth-child(odd of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(odd of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(odd of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of #id:empty)"
+PASS document.querySelector(":nth-child(odd of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of #id:empty)"
+PASS document.querySelector(":nth-child(odd of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a > b)"
+PASS document.querySelector(":nth-child(odd of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a > b)"
+PASS document.querySelector(":nth-child(odd of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a b)"
+PASS document.querySelector(":nth-child(odd of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a b)"
+PASS document.querySelector(":nth-child(odd of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a + b)"
+PASS document.querySelector(":nth-child(odd of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a + b)"
+PASS document.querySelector(":nth-child(odd of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a ~ b)"
+PASS document.querySelector(":nth-child(odd of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a ~ b)"
+PASS document.querySelector(":nth-child(odd of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(odd of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(odd of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, a)"
+PASS document.querySelector(":nth-child(odd of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, a)"
+PASS document.querySelector(":nth-child(odd of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, b)"
+PASS document.querySelector(":nth-child(odd of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, b)"
+PASS document.querySelector(":nth-child(odd of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, b, c, d)"
+PASS document.querySelector(":nth-child(odd of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a, b, c, d)"
+PASS document.querySelector(":nth-child(odd of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(odd of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(odd of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(odd of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of *)"
+PASS document.querySelector(":nth-child(n of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of *)"
+PASS document.querySelector(":nth-child(n of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of foobar)"
+PASS document.querySelector(":nth-child(n of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of foobar)"
+PASS document.querySelector(":nth-child(n of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of #id)"
+PASS document.querySelector(":nth-child(n of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of #id)"
+PASS document.querySelector(":nth-child(n of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .class)"
+PASS document.querySelector(":nth-child(n of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .class)"
+PASS document.querySelector(":nth-child(n of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of :first-child)"
+PASS document.querySelector(":nth-child(n of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of :first-child)"
+PASS document.querySelector(":nth-child(n of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of :last-child)"
+PASS document.querySelector(":nth-child(n of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of :last-child)"
+PASS document.querySelector(":nth-child(n of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of foobar#id.class)"
+PASS document.querySelector(":nth-child(n of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of foobar#id.class)"
+PASS document.querySelector(":nth-child(n of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of #id:empty)"
+PASS document.querySelector(":nth-child(n of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of #id:empty)"
+PASS document.querySelector(":nth-child(n of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a > b)"
+PASS document.querySelector(":nth-child(n of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a > b)"
+PASS document.querySelector(":nth-child(n of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a b)"
+PASS document.querySelector(":nth-child(n of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a b)"
+PASS document.querySelector(":nth-child(n of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a + b)"
+PASS document.querySelector(":nth-child(n of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a + b)"
+PASS document.querySelector(":nth-child(n of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a ~ b)"
+PASS document.querySelector(":nth-child(n of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a ~ b)"
+PASS document.querySelector(":nth-child(n of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, a)"
+PASS document.querySelector(":nth-child(n of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, a)"
+PASS document.querySelector(":nth-child(n of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, b)"
+PASS document.querySelector(":nth-child(n of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, b)"
+PASS document.querySelector(":nth-child(n of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, b, c, d)"
+PASS document.querySelector(":nth-child(n of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a, b, c, d)"
+PASS document.querySelector(":nth-child(n of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-n of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of *)"
+PASS document.querySelector(":nth-child(-n of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of *)"
+PASS document.querySelector(":nth-child(-n of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of foobar)"
+PASS document.querySelector(":nth-child(-n of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of foobar)"
+PASS document.querySelector(":nth-child(-n of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of #id)"
+PASS document.querySelector(":nth-child(-n of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of #id)"
+PASS document.querySelector(":nth-child(-n of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .class)"
+PASS document.querySelector(":nth-child(-n of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .class)"
+PASS document.querySelector(":nth-child(-n of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of :first-child)"
+PASS document.querySelector(":nth-child(-n of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of :first-child)"
+PASS document.querySelector(":nth-child(-n of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of :last-child)"
+PASS document.querySelector(":nth-child(-n of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of :last-child)"
+PASS document.querySelector(":nth-child(-n of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of foobar#id.class)"
+PASS document.querySelector(":nth-child(-n of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of foobar#id.class)"
+PASS document.querySelector(":nth-child(-n of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-n of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-n of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of #id:empty)"
+PASS document.querySelector(":nth-child(-n of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of #id:empty)"
+PASS document.querySelector(":nth-child(-n of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a > b)"
+PASS document.querySelector(":nth-child(-n of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a > b)"
+PASS document.querySelector(":nth-child(-n of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a b)"
+PASS document.querySelector(":nth-child(-n of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a b)"
+PASS document.querySelector(":nth-child(-n of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a + b)"
+PASS document.querySelector(":nth-child(-n of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a + b)"
+PASS document.querySelector(":nth-child(-n of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a ~ b)"
+PASS document.querySelector(":nth-child(-n of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a ~ b)"
+PASS document.querySelector(":nth-child(-n of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-n of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-n of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, a)"
+PASS document.querySelector(":nth-child(-n of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, a)"
+PASS document.querySelector(":nth-child(-n of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, b)"
+PASS document.querySelector(":nth-child(-n of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, b)"
+PASS document.querySelector(":nth-child(-n of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, b, c, d)"
+PASS document.querySelector(":nth-child(-n of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a, b, c, d)"
+PASS document.querySelector(":nth-child(-n of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-n of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-n of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-n of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of *)"
+PASS document.querySelector(":nth-child(3 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of *)"
+PASS document.querySelector(":nth-child(3 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of foobar)"
+PASS document.querySelector(":nth-child(3 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of foobar)"
+PASS document.querySelector(":nth-child(3 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of #id)"
+PASS document.querySelector(":nth-child(3 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of #id)"
+PASS document.querySelector(":nth-child(3 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .class)"
+PASS document.querySelector(":nth-child(3 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .class)"
+PASS document.querySelector(":nth-child(3 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of :first-child)"
+PASS document.querySelector(":nth-child(3 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of :first-child)"
+PASS document.querySelector(":nth-child(3 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of :last-child)"
+PASS document.querySelector(":nth-child(3 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of :last-child)"
+PASS document.querySelector(":nth-child(3 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of #id:empty)"
+PASS document.querySelector(":nth-child(3 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of #id:empty)"
+PASS document.querySelector(":nth-child(3 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a > b)"
+PASS document.querySelector(":nth-child(3 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a > b)"
+PASS document.querySelector(":nth-child(3 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a b)"
+PASS document.querySelector(":nth-child(3 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a b)"
+PASS document.querySelector(":nth-child(3 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a + b)"
+PASS document.querySelector(":nth-child(3 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a + b)"
+PASS document.querySelector(":nth-child(3 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a ~ b)"
+PASS document.querySelector(":nth-child(3 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a ~ b)"
+PASS document.querySelector(":nth-child(3 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, a)"
+PASS document.querySelector(":nth-child(3 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, a)"
+PASS document.querySelector(":nth-child(3 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, b)"
+PASS document.querySelector(":nth-child(3 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, b)"
+PASS document.querySelector(":nth-child(3 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of *)"
+PASS document.querySelector(":nth-child(-3 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of *)"
+PASS document.querySelector(":nth-child(-3 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of foobar)"
+PASS document.querySelector(":nth-child(-3 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of foobar)"
+PASS document.querySelector(":nth-child(-3 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of #id)"
+PASS document.querySelector(":nth-child(-3 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of #id)"
+PASS document.querySelector(":nth-child(-3 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .class)"
+PASS document.querySelector(":nth-child(-3 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .class)"
+PASS document.querySelector(":nth-child(-3 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of :first-child)"
+PASS document.querySelector(":nth-child(-3 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of :first-child)"
+PASS document.querySelector(":nth-child(-3 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of :last-child)"
+PASS document.querySelector(":nth-child(-3 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of :last-child)"
+PASS document.querySelector(":nth-child(-3 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of #id:empty)"
+PASS document.querySelector(":nth-child(-3 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of #id:empty)"
+PASS document.querySelector(":nth-child(-3 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a > b)"
+PASS document.querySelector(":nth-child(-3 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a > b)"
+PASS document.querySelector(":nth-child(-3 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a b)"
+PASS document.querySelector(":nth-child(-3 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a b)"
+PASS document.querySelector(":nth-child(-3 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a + b)"
+PASS document.querySelector(":nth-child(-3 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a + b)"
+PASS document.querySelector(":nth-child(-3 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a ~ b)"
+PASS document.querySelector(":nth-child(-3 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a ~ b)"
+PASS document.querySelector(":nth-child(-3 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, a)"
+PASS document.querySelector(":nth-child(-3 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, a)"
+PASS document.querySelector(":nth-child(-3 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, b)"
+PASS document.querySelector(":nth-child(-3 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, b)"
+PASS document.querySelector(":nth-child(-3 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n+0 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of *)"
+PASS document.querySelector(":nth-child(n+0 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of *)"
+PASS document.querySelector(":nth-child(n+0 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of foobar)"
+PASS document.querySelector(":nth-child(n+0 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of foobar)"
+PASS document.querySelector(":nth-child(n+0 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of #id)"
+PASS document.querySelector(":nth-child(n+0 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of #id)"
+PASS document.querySelector(":nth-child(n+0 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .class)"
+PASS document.querySelector(":nth-child(n+0 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .class)"
+PASS document.querySelector(":nth-child(n+0 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of :first-child)"
+PASS document.querySelector(":nth-child(n+0 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of :first-child)"
+PASS document.querySelector(":nth-child(n+0 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of :last-child)"
+PASS document.querySelector(":nth-child(n+0 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of :last-child)"
+PASS document.querySelector(":nth-child(n+0 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of foobar#id.class)"
+PASS document.querySelector(":nth-child(n+0 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of foobar#id.class)"
+PASS document.querySelector(":nth-child(n+0 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n+0 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n+0 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of #id:empty)"
+PASS document.querySelector(":nth-child(n+0 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of #id:empty)"
+PASS document.querySelector(":nth-child(n+0 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a > b)"
+PASS document.querySelector(":nth-child(n+0 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a > b)"
+PASS document.querySelector(":nth-child(n+0 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a b)"
+PASS document.querySelector(":nth-child(n+0 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a b)"
+PASS document.querySelector(":nth-child(n+0 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a + b)"
+PASS document.querySelector(":nth-child(n+0 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a + b)"
+PASS document.querySelector(":nth-child(n+0 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a ~ b)"
+PASS document.querySelector(":nth-child(n+0 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a ~ b)"
+PASS document.querySelector(":nth-child(n+0 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n+0 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n+0 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, a)"
+PASS document.querySelector(":nth-child(n+0 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, a)"
+PASS document.querySelector(":nth-child(n+0 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, b)"
+PASS document.querySelector(":nth-child(n+0 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, b)"
+PASS document.querySelector(":nth-child(n+0 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, b, c, d)"
+PASS document.querySelector(":nth-child(n+0 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a, b, c, d)"
+PASS document.querySelector(":nth-child(n+0 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n+0 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n+0 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n+0 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n-0 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of *)"
+PASS document.querySelector(":nth-child(n-0 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of *)"
+PASS document.querySelector(":nth-child(n-0 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of foobar)"
+PASS document.querySelector(":nth-child(n-0 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of foobar)"
+PASS document.querySelector(":nth-child(n-0 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of #id)"
+PASS document.querySelector(":nth-child(n-0 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of #id)"
+PASS document.querySelector(":nth-child(n-0 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .class)"
+PASS document.querySelector(":nth-child(n-0 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .class)"
+PASS document.querySelector(":nth-child(n-0 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of :first-child)"
+PASS document.querySelector(":nth-child(n-0 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of :first-child)"
+PASS document.querySelector(":nth-child(n-0 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of :last-child)"
+PASS document.querySelector(":nth-child(n-0 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of :last-child)"
+PASS document.querySelector(":nth-child(n-0 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of foobar#id.class)"
+PASS document.querySelector(":nth-child(n-0 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of foobar#id.class)"
+PASS document.querySelector(":nth-child(n-0 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n-0 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(n-0 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of #id:empty)"
+PASS document.querySelector(":nth-child(n-0 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of #id:empty)"
+PASS document.querySelector(":nth-child(n-0 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a > b)"
+PASS document.querySelector(":nth-child(n-0 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a > b)"
+PASS document.querySelector(":nth-child(n-0 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a b)"
+PASS document.querySelector(":nth-child(n-0 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a b)"
+PASS document.querySelector(":nth-child(n-0 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a + b)"
+PASS document.querySelector(":nth-child(n-0 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a + b)"
+PASS document.querySelector(":nth-child(n-0 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a ~ b)"
+PASS document.querySelector(":nth-child(n-0 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a ~ b)"
+PASS document.querySelector(":nth-child(n-0 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n-0 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(n-0 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, a)"
+PASS document.querySelector(":nth-child(n-0 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, a)"
+PASS document.querySelector(":nth-child(n-0 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, b)"
+PASS document.querySelector(":nth-child(n-0 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, b)"
+PASS document.querySelector(":nth-child(n-0 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, b, c, d)"
+PASS document.querySelector(":nth-child(n-0 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a, b, c, d)"
+PASS document.querySelector(":nth-child(n-0 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n-0 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(n-0 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(n-0 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(0n of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of *)"
+PASS document.querySelector(":nth-child(0n of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of *)"
+PASS document.querySelector(":nth-child(0n of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of foobar)"
+PASS document.querySelector(":nth-child(0n of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of foobar)"
+PASS document.querySelector(":nth-child(0n of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of #id)"
+PASS document.querySelector(":nth-child(0n of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of #id)"
+PASS document.querySelector(":nth-child(0n of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .class)"
+PASS document.querySelector(":nth-child(0n of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .class)"
+PASS document.querySelector(":nth-child(0n of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of :first-child)"
+PASS document.querySelector(":nth-child(0n of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of :first-child)"
+PASS document.querySelector(":nth-child(0n of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of :last-child)"
+PASS document.querySelector(":nth-child(0n of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of :last-child)"
+PASS document.querySelector(":nth-child(0n of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of foobar#id.class)"
+PASS document.querySelector(":nth-child(0n of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of foobar#id.class)"
+PASS document.querySelector(":nth-child(0n of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(0n of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(0n of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of #id:empty)"
+PASS document.querySelector(":nth-child(0n of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of #id:empty)"
+PASS document.querySelector(":nth-child(0n of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a > b)"
+PASS document.querySelector(":nth-child(0n of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a > b)"
+PASS document.querySelector(":nth-child(0n of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a b)"
+PASS document.querySelector(":nth-child(0n of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a b)"
+PASS document.querySelector(":nth-child(0n of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a + b)"
+PASS document.querySelector(":nth-child(0n of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a + b)"
+PASS document.querySelector(":nth-child(0n of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a ~ b)"
+PASS document.querySelector(":nth-child(0n of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a ~ b)"
+PASS document.querySelector(":nth-child(0n of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(0n of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(0n of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, a)"
+PASS document.querySelector(":nth-child(0n of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, a)"
+PASS document.querySelector(":nth-child(0n of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, b)"
+PASS document.querySelector(":nth-child(0n of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, b)"
+PASS document.querySelector(":nth-child(0n of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, b, c, d)"
+PASS document.querySelector(":nth-child(0n of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a, b, c, d)"
+PASS document.querySelector(":nth-child(0n of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(0n of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(0n of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(0n of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3n+5 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of *)"
+PASS document.querySelector(":nth-child(3n+5 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of *)"
+PASS document.querySelector(":nth-child(3n+5 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of foobar)"
+PASS document.querySelector(":nth-child(3n+5 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of foobar)"
+PASS document.querySelector(":nth-child(3n+5 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of #id)"
+PASS document.querySelector(":nth-child(3n+5 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of #id)"
+PASS document.querySelector(":nth-child(3n+5 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .class)"
+PASS document.querySelector(":nth-child(3n+5 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .class)"
+PASS document.querySelector(":nth-child(3n+5 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of :first-child)"
+PASS document.querySelector(":nth-child(3n+5 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of :first-child)"
+PASS document.querySelector(":nth-child(3n+5 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of :last-child)"
+PASS document.querySelector(":nth-child(3n+5 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of :last-child)"
+PASS document.querySelector(":nth-child(3n+5 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3n+5 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3n+5 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3n+5 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3n+5 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of #id:empty)"
+PASS document.querySelector(":nth-child(3n+5 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of #id:empty)"
+PASS document.querySelector(":nth-child(3n+5 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a > b)"
+PASS document.querySelector(":nth-child(3n+5 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a > b)"
+PASS document.querySelector(":nth-child(3n+5 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a b)"
+PASS document.querySelector(":nth-child(3n+5 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a b)"
+PASS document.querySelector(":nth-child(3n+5 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a + b)"
+PASS document.querySelector(":nth-child(3n+5 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a + b)"
+PASS document.querySelector(":nth-child(3n+5 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a ~ b)"
+PASS document.querySelector(":nth-child(3n+5 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a ~ b)"
+PASS document.querySelector(":nth-child(3n+5 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3n+5 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3n+5 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, a)"
+PASS document.querySelector(":nth-child(3n+5 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, a)"
+PASS document.querySelector(":nth-child(3n+5 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, b)"
+PASS document.querySelector(":nth-child(3n+5 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, b)"
+PASS document.querySelector(":nth-child(3n+5 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3n+5 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3n+5 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3n+5 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3n+5 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3n+5 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3n+5 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of *)"
+PASS document.querySelector(":nth-child(-3n+5 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of *)"
+PASS document.querySelector(":nth-child(-3n+5 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of foobar)"
+PASS document.querySelector(":nth-child(-3n+5 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of foobar)"
+PASS document.querySelector(":nth-child(-3n+5 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of #id)"
+PASS document.querySelector(":nth-child(-3n+5 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of #id)"
+PASS document.querySelector(":nth-child(-3n+5 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .class)"
+PASS document.querySelector(":nth-child(-3n+5 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .class)"
+PASS document.querySelector(":nth-child(-3n+5 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of :first-child)"
+PASS document.querySelector(":nth-child(-3n+5 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of :first-child)"
+PASS document.querySelector(":nth-child(-3n+5 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of :last-child)"
+PASS document.querySelector(":nth-child(-3n+5 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of :last-child)"
+PASS document.querySelector(":nth-child(-3n+5 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3n+5 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3n+5 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3n+5 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3n+5 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of #id:empty)"
+PASS document.querySelector(":nth-child(-3n+5 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of #id:empty)"
+PASS document.querySelector(":nth-child(-3n+5 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a > b)"
+PASS document.querySelector(":nth-child(-3n+5 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a > b)"
+PASS document.querySelector(":nth-child(-3n+5 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a b)"
+PASS document.querySelector(":nth-child(-3n+5 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a b)"
+PASS document.querySelector(":nth-child(-3n+5 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a + b)"
+PASS document.querySelector(":nth-child(-3n+5 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a + b)"
+PASS document.querySelector(":nth-child(-3n+5 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a ~ b)"
+PASS document.querySelector(":nth-child(-3n+5 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a ~ b)"
+PASS document.querySelector(":nth-child(-3n+5 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3n+5 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3n+5 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, a)"
+PASS document.querySelector(":nth-child(-3n+5 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, a)"
+PASS document.querySelector(":nth-child(-3n+5 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, b)"
+PASS document.querySelector(":nth-child(-3n+5 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, b)"
+PASS document.querySelector(":nth-child(-3n+5 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3n+5 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3n+5 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3n+5 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3n+5 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3n+5 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3n-5 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of *)"
+PASS document.querySelector(":nth-child(3n-5 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of *)"
+PASS document.querySelector(":nth-child(3n-5 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of foobar)"
+PASS document.querySelector(":nth-child(3n-5 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of foobar)"
+PASS document.querySelector(":nth-child(3n-5 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of #id)"
+PASS document.querySelector(":nth-child(3n-5 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of #id)"
+PASS document.querySelector(":nth-child(3n-5 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .class)"
+PASS document.querySelector(":nth-child(3n-5 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .class)"
+PASS document.querySelector(":nth-child(3n-5 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of :first-child)"
+PASS document.querySelector(":nth-child(3n-5 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of :first-child)"
+PASS document.querySelector(":nth-child(3n-5 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of :last-child)"
+PASS document.querySelector(":nth-child(3n-5 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of :last-child)"
+PASS document.querySelector(":nth-child(3n-5 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3n-5 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(3n-5 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3n-5 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(3n-5 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of #id:empty)"
+PASS document.querySelector(":nth-child(3n-5 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of #id:empty)"
+PASS document.querySelector(":nth-child(3n-5 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a > b)"
+PASS document.querySelector(":nth-child(3n-5 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a > b)"
+PASS document.querySelector(":nth-child(3n-5 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a b)"
+PASS document.querySelector(":nth-child(3n-5 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a b)"
+PASS document.querySelector(":nth-child(3n-5 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a + b)"
+PASS document.querySelector(":nth-child(3n-5 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a + b)"
+PASS document.querySelector(":nth-child(3n-5 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a ~ b)"
+PASS document.querySelector(":nth-child(3n-5 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a ~ b)"
+PASS document.querySelector(":nth-child(3n-5 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3n-5 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(3n-5 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, a)"
+PASS document.querySelector(":nth-child(3n-5 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, a)"
+PASS document.querySelector(":nth-child(3n-5 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, b)"
+PASS document.querySelector(":nth-child(3n-5 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, b)"
+PASS document.querySelector(":nth-child(3n-5 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3n-5 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(3n-5 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3n-5 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(3n-5 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(3n-5 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3n-5 of *)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of *)"
+PASS document.querySelector(":nth-child(-3n-5 of * )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of *)"
+PASS document.querySelector(":nth-child(-3n-5 of foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of foobar)"
+PASS document.querySelector(":nth-child(-3n-5 of foobar )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of foobar)"
+PASS document.querySelector(":nth-child(-3n-5 of #id)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of #id)"
+PASS document.querySelector(":nth-child(-3n-5 of #id )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of #id)"
+PASS document.querySelector(":nth-child(-3n-5 of .class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .class)"
+PASS document.querySelector(":nth-child(-3n-5 of .class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .class)"
+PASS document.querySelector(":nth-child(-3n-5 of :first-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of :first-child)"
+PASS document.querySelector(":nth-child(-3n-5 of :first-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of :first-child)"
+PASS document.querySelector(":nth-child(-3n-5 of :last-child)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of :last-child)"
+PASS document.querySelector(":nth-child(-3n-5 of :last-child )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of :last-child)"
+PASS document.querySelector(":nth-child(-3n-5 of foobar#id.class)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3n-5 of foobar#id.class )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of foobar#id.class)"
+PASS document.querySelector(":nth-child(-3n-5 of .class:not(.notclass))") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3n-5 of .class:not(.notclass) )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .class:not(.notclass))"
+PASS document.querySelector(":nth-child(-3n-5 of #id:empty)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of #id:empty)"
+PASS document.querySelector(":nth-child(-3n-5 of #id:empty )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of #id:empty)"
+PASS document.querySelector(":nth-child(-3n-5 of a > b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a > b)"
+PASS document.querySelector(":nth-child(-3n-5 of a > b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a > b)"
+PASS document.querySelector(":nth-child(-3n-5 of a b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a b)"
+PASS document.querySelector(":nth-child(-3n-5 of a b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a b)"
+PASS document.querySelector(":nth-child(-3n-5 of a + b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a + b)"
+PASS document.querySelector(":nth-child(-3n-5 of a + b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a + b)"
+PASS document.querySelector(":nth-child(-3n-5 of a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a ~ b)"
+PASS document.querySelector(":nth-child(-3n-5 of a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a ~ b)"
+PASS document.querySelector(":nth-child(-3n-5 of a + b > c ~ d e + g)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3n-5 of a + b > c ~ d e + g )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a + b > c ~ d e + g)"
+PASS document.querySelector(":nth-child(-3n-5 of a, a)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, a)"
+PASS document.querySelector(":nth-child(-3n-5 of a, a )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, a)"
+PASS document.querySelector(":nth-child(-3n-5 of a, b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, b)"
+PASS document.querySelector(":nth-child(-3n-5 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, b)"
+PASS document.querySelector(":nth-child(-3n-5 of a, b, c, d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3n-5 of a, b, c, d )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a, b, c, d)"
+PASS document.querySelector(":nth-child(-3n-5 of .foo, .bar, .baz)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3n-5 of .foo, .bar, .baz )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foo, .bar, .baz)"
+PASS document.querySelector(":nth-child(-3n-5 of a > b, a b, a + b, a ~ b)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a > b, a b, a + b, a ~ b)"
+PASS document.querySelector(":nth-child(-3n-5 of a > b, a b, a + b, a ~ b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of a > b, a b, a + b, a ~ b)"
+Test serizalization.
+PASS document.querySelector(":nth-child(2n+1 of a,b,c,d)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of a, b, c, d)"
+PASS document.querySelector(":nth-child( 2n+1 of a, b )") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of a, b)"
+PASS document.querySelector(":nth-child(2n+1 of a>b, c d, e~f, g+h)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of a > b, c d, e ~ f, g + h)"
+PASS document.querySelector(":nth-child(2n+1 of n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of n)"
+PASS document.querySelector(":nth-child(2n+1 of n-1)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of n-1)"
+PASS document.querySelector(":nth-child(2n+1 of .n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of .n)"
+PASS document.querySelector(":nth-child(2n+1 of .-n-1)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of .-n-1)"
+PASS document.querySelector(":nth-child(2n+1 of .n-1)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of .n-1)"
+PASS document.querySelector(":nth-child(2n+1 of n+n)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(2n+1 of n + n)"
+PASS document.querySelector(":nth-child(even of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(odd of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(n of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(-n of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(3 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(0n of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 Of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 oF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 OF .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(even \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(even \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(even of .foobar)"
+PASS document.querySelector(":nth-child(odd \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(odd \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(odd of .foobar)"
+PASS document.querySelector(":nth-child(n \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(n \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(-n \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-n of .foobar)"
+PASS document.querySelector(":nth-child(3 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(3 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(-3 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n+0 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n+0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(n-0 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(n-0 of .foobar)"
+PASS document.querySelector(":nth-child(0n \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(0n \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(0n of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n+5 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n+5 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n+5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(3n-5 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\of .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\00006ff .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 o\\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\00006F \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\00004f \\000066 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\00006F \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\00004f \\000046 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\6f f .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 o\\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\6F \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\4f \\66 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\6F \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+PASS document.querySelector(":nth-child(-3n-5 \\4f \\46 .foobar)") did not throw exception.
+PASS document.getElementById('style-container').sheet.cssRules.length is 1
+PASS document.getElementById('style-container').sheet.cssRules[0].selectorText is ":nth-child(-3n-5 of .foobar)"
+
+Test invalid selectors:
+PASS document.querySelector(":nth-child(even of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(evenof .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(oddof .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(nof .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-nof .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0nof .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of )") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of.class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5of .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 empty .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 from .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 to .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 webkit .class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ::first-letter)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ::after)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ::-webkit-custom)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of .foo, ::before)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ::before, .foo)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of -webkit-any(::before, .foo))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of :nth-child(2n+1 of ::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of :not(::before))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(even of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(odd of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-n of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n+0 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(n-0 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(0n of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n+5 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n+5 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(3n-5 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of .123class)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of #123id)") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of [])") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ())") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of ))") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of {})") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS document.querySelector(":nth-child(-3n-5 of })") threw exception Error: SyntaxError: DOM Exception 12.
+PASS document.getElementById('style-container').sheet.cssRules.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingcssnthchildofhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-css-nth-child-of.html (0 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-css-nth-child-of.html         (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-css-nth-child-of.html        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -0,0 +1,182 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<style id="style-container">
+</style>
+</head>
+<body>
+</body>
+<script>
+description('Test the parsing of :nth-child(of) for querySelector and style.');
+
+function testInvalidSelector(selectorString) {
+ shouldThrow('document.querySelector(":nth-child(' + selectorString + ')")', '"Error: SyntaxError: DOM Exception 12"');
+
+ var styleContainer = document.getElementById('style-container');
+ styleContainer.innerHTML = ':nth-child(' + selectorString + ') { }';
+ shouldBe("document.getElementById('style-container').sheet.cssRules.length", "0");
+ styleContainer.innerHTML = '';
+}
+
+function testValidSelector(selectorString, expectedSerializedSelector) {
+ shouldNotThrow('document.querySelector(":nth-child(' + selectorString.replace(/\\/g, '\\\\') + ')")', '"Error: SyntaxError: DOM Exception 12"');
+
+ var styleContainer = document.getElementById('style-container');
+ styleContainer.innerHTML = ':nth-child(' + selectorString + ') { }';
+ shouldBe("document.getElementById('style-container').sheet.cssRules.length", "1");
+ if (!expectedSerializedSelector)
+ expectedSerializedSelector = selectorString;
+ shouldBeEqualToString("document.getElementById('style-container').sheet.cssRules[0].selectorText", ':nth-child(' + expectedSerializedSelector + ')');
+ styleContainer.innerHTML = '';
+}
+
+// There are multiple ways of parsing :nth-child() based on the An+B part, we should test everything.
+var validNthAnPlusB = [
+ "even",
+ "odd",
+ "n",
+ "-n",
+ "3",
+ "-3",
+ "n+0",
+ "n-0",
+ "0n",
+ "3n+5",
+ "-3n+5",
+ "3n-5",
+ "-3n-5",
+];
+
+debug("Basic valid cases without [of selectors]");
+for (var i = 0; i < validNthAnPlusB.length; ++i)
+ testValidSelector(validNthAnPlusB[i], validNthAnPlusB[i]);
+
+var validRightSide = [
+ // Basic types.
+ "*",
+ "foobar",
+ "#id",
+ ".class",
+ ":first-child",
+ ":last-child",
+
+ // Compound selectors.
+ "foobar#id.class",
+ ".class:not(.notclass)",
+ "#id:empty",
+
+ // Complex selectors.
+ "a > b",
+ "a b",
+ "a + b",
+ "a ~ b",
+ "a + b > c ~ d e + g",
+
+ // Selector lists.
+ "a, a",
+ "a, b",
+ "a, b, c, d",
+ ".foo, .bar, .baz",
+ "a > b, a b, a + b, a ~ b",
+];
+
+debug("Basic cases with [of selectors]");
+for (var leftSideIndex = 0; leftSideIndex < validNthAnPlusB.length; ++leftSideIndex) {
+ for (var rightSideIndex = 0; rightSideIndex < validRightSide.length; ++rightSideIndex) {
+ var selectorString = validNthAnPlusB[leftSideIndex] + " of " + validRightSide[rightSideIndex];
+ testValidSelector(selectorString);
+ testValidSelector(selectorString + " ", selectorString);
+ }
+}
+
+debug("Test serizalization.");
+testValidSelector("2n+1 of a,b,c,d", "2n+1 of a, b, c, d"); // Space separated complex selector.
+testValidSelector(" 2n+1 of a, b ", "2n+1 of a, b"); // Ignored extra spaces.
+testValidSelector("2n+1 of a>b, c d, e~f, g+h", "2n+1 of a > b, c d, e ~ f, g + h"); // Combinators.
+
+// At the time of writing this test, the CSS Parser has a special mode for nth-*. Test it does not conflict with regular parsing.
+testValidSelector("2n+1 of n");
+testValidSelector("2n+1 of n-1"); // "n-1" is a perfectly valid element name.
+testValidSelector("2n+1 of .n");
+testValidSelector("2n+1 of .-n-1");
+testValidSelector("2n+1 of .n-1");
+testValidSelector("2n+1 of n+n", "2n+1 of n + n");
+
+// Test case sensitivity of the separator "of". CSS 2.1 defines that "All CSS syntax is case-insensitive within the ASCII range".
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ testValidSelector(validNthAnPlusB[i] + " of .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " Of .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " oF .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " OF .foobar", validNthAnPlusB[i] + " of .foobar");
+}
+
+// CSS 2.1 "Characters and case" (http://www.w3.org/TR/CSS21/syndata.html#characters) section defines escaping for strings and identifiers:
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ // There is no formal definition of escaping of regular characters, but there is a note saying: 'The identifier "te\st" is exactly the same identifier as "test".'.
+ testValidSelector(validNthAnPlusB[i] + " \\of .foobar", validNthAnPlusB[i] + " of .foobar");
+
+ // Full hexadecimal escape ('o' = 0x6f, 'f' = 0x66, 'O' = 0x4f, 'F' = 0x46.
+ testValidSelector(validNthAnPlusB[i] + " \\00006ff .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " o\\000066 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\00006F \\000066 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\00004f \\000066 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\00006F \\000046 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\00004f \\000046 .foobar", validNthAnPlusB[i] + " of .foobar");
+
+ // Short syntax ('o' = 0x6f, 'f' = 0x66, 'O' = 0x4f, 'F' = 0x46.
+ testValidSelector(validNthAnPlusB[i] + " \\6f f .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " o\\66 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\6F \\66 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\4f \\66 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\6F \\46 .foobar", validNthAnPlusB[i] + " of .foobar");
+ testValidSelector(validNthAnPlusB[i] + " \\4f \\46 .foobar", validNthAnPlusB[i] + " of .foobar");
+}
+
+
+debug("");
+debug("Test invalid selectors:");
+// Missing space characters.
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ testInvalidSelector(validNthAnPlusB[i] + " of");
+ testInvalidSelector(validNthAnPlusB[i] + " of ");
+ testInvalidSelector(validNthAnPlusB[i] + " of.class");
+ testInvalidSelector(validNthAnPlusB[i] + "of .class");
+}
+
+// Use valid identifier but not "of" as a separator.
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ testInvalidSelector(validNthAnPlusB[i] + " empty .class");
+ testInvalidSelector(validNthAnPlusB[i] + " from .class");
+ testInvalidSelector(validNthAnPlusB[i] + " to .class");
+ testInvalidSelector(validNthAnPlusB[i] + " webkit .class");
+}
+
+// Matching pseudo elements do not make any sense.
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ testInvalidSelector(validNthAnPlusB[i] + " of ::first-letter");
+ testInvalidSelector(validNthAnPlusB[i] + " of ::before");
+ testInvalidSelector(validNthAnPlusB[i] + " of ::after");
+ testInvalidSelector(validNthAnPlusB[i] + " of ::-webkit-custom");
+
+ testInvalidSelector(validNthAnPlusB[i] + " of .foo, ::before");
+ testInvalidSelector(validNthAnPlusB[i] + " of ::before, .foo");
+ testInvalidSelector(validNthAnPlusB[i] + " of -webkit-any(::before, .foo)");
+ testInvalidSelector(validNthAnPlusB[i] + " of :nth-child(2n+1 of ::before)");
+ testInvalidSelector(validNthAnPlusB[i] + " of :not(::before)");
+}
+
+// Invalid identifiers, syntax, etc.
+for (var i = 0; i < validNthAnPlusB.length; ++i) {
+ testInvalidSelector(validNthAnPlusB[i] + " of .123class");
+ testInvalidSelector(validNthAnPlusB[i] + " of #123id");
+ testInvalidSelector(validNthAnPlusB[i] + " of []");
+ testInvalidSelector(validNthAnPlusB[i] + " of ()");
+ testInvalidSelector(validNthAnPlusB[i] + " of )");
+ testInvalidSelector(validNthAnPlusB[i] + " of {}");
+ testInvalidSelector(validNthAnPlusB[i] + " of }");
+}
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/ChangeLog        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,5 +1,51 @@
</span><span class="cx"> 2014-09-17 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><ins>+ Add parsing for :nth-child(An+B of selector)
+ https://bugs.webkit.org/show_bug.cgi?id=136845
+
+ Reviewed by Antti Koivisto.
+
+ Add support for parsing :nth-child(of). The implementation of selector matching
+ will be in a follow up, there are enough edge cases here already.
+
+ Spec here: http://dev.w3.org/csswg/selectors4/#the-nth-child-pseudo
+
+ Test: fast/css/parsing-css-nth-child-of.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::detectFunctionTypeToken):
+ (WebCore::CSSParser::realLex):
+ The parser generate two new kinds of tokens:
+ -NTHCHILDFUNCTION, matching the "nth-child" identifier.
+ -NTHCHILDSELECTORSEPARATOR, matching the "of" keyword separating An+B from the selector list.
+
+ NTHCHILDFUNCTION is used to extend the new syntax only for :nth-child() and not all the "nth" functions
+ (e.g. :nth-of-type()).
+
+ NTHCHILDSELECTORSEPARATOR exists for two reasons:
+ -We must clear the "parsingMode" before parsing selectorList. If we failed to do that, the complex selectors
+ would be parsed in NthChildMode, which has all kind of bad side effects.
+ -The second reason is differentiacting "of" for all the other identifiers. Arguably, this could have been done
+ in the grammar, but it is clearer this way since we already need the branches for the parsingMode.
+
+ * css/CSSGrammar.y.in:
+ Those are pretty much duplicates of the existing FUNCTION rules but supporting the new syntax.
+
+ * css/CSSParserValues.cpp:
+ (WebCore::selectorListMatchesPseudoElement):
+ (WebCore::CSSParserSelector::matchesPseudoElement):
+ Matching pseudo elements does not make much sense for those selectorList (e.g. :nth-child(2n of ::before)).
+ Add helper function to fail parsing of those cases.
+
+ * css/CSSParserValues.h:
+ * css/CSSSelector.cpp:
+ (WebCore::CSSSelector::selectorText):
+ * css/CSSSelector.h:
+ (WebCore::CSSSelector::selectorList):
+ Updated serialization code for CSS OM.
+
+2014-09-17 Benjamin Poulain <bpoulain@apple.com>
+
</ins><span class="cx"> CSS value in whitespace-separated list attribute selector (~=) mishandles tab/newline/etc.
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=136807
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
</span><span class="cx"> * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
</span><span class="cx"> * Copyright (C) 2012 Intel Corporation. All rights reserved.
</span><span class="lines">@@ -59,6 +59,8 @@
</span><span class="cx"> case CALCFUNCTION:
</span><span class="cx"> case MINFUNCTION:
</span><span class="cx"> case MAXFUNCTION:
</span><ins>+ case NTHCHILDFUNCTION:
+ case NTHCHILDSELECTORSEPARATOR:
</ins><span class="cx"> case UNICODERANGE:
</span><span class="cx"> return true;
</span><span class="cx"> default:
</span><span class="lines">@@ -77,19 +79,38 @@
</span><span class="cx"> return v;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+auto invalidSelectorVector = reinterpret_cast<Vector<std::unique_ptr<CSSParserSelector>>*>(-1);
+
+static bool isValidNthSelectorList(const Vector<std::unique_ptr<CSSParserSelector>>* selectorVector)
+{
+ if (!selectorVector)
+ return true;
+
+ if (selectorVector == invalidSelectorVector)
+ return false;
+
+ for (unsigned i = 0; i < selectorVector->size(); ++i) {
+ for (const CSSParserSelector* selector = selectorVector->at(i).get(); selector; selector = selector->tagHistory()) {
+ if (selector->matchesPseudoElement())
+ return false;
+ }
+ }
+ return true;
+}
+
</ins><span class="cx"> %}
</span><span class="cx">
</span><span class="cx"> #if ENABLE_CSS_GRID_LAYOUT
</span><span class="cx"> #if ENABLE_PICTURE_SIZES
</span><del>-%expect 34
</del><ins>+%expect 36
</ins><span class="cx"> #else
</span><del>-%expect 30
</del><ins>+%expect 32
</ins><span class="cx"> #endif
</span><span class="cx"> #else
</span><span class="cx"> #if ENABLE_PICTURE_SIZES
</span><del>-%expect 33
</del><ins>+%expect 35
</ins><span class="cx"> #else
</span><del>-%expect 29
</del><ins>+%expect 31
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -109,6 +130,7 @@
</span><span class="cx"> %token <string> STRING
</span><span class="cx"> %right <string> IDENT
</span><span class="cx"> %token <string> NTH
</span><ins>+%token <string> NTHCHILDSELECTORSEPARATOR
</ins><span class="cx">
</span><span class="cx"> %nonassoc <string> HEX
</span><span class="cx"> %nonassoc <string> IDSEL
</span><span class="lines">@@ -201,6 +223,7 @@
</span><span class="cx"> %token <string> CALCFUNCTION
</span><span class="cx"> %token <string> MINFUNCTION
</span><span class="cx"> %token <string> MAXFUNCTION
</span><ins>+%token <string> NTHCHILDFUNCTION
</ins><span class="cx">
</span><span class="cx"> %token <string> UNICODERANGE
</span><span class="cx">
</span><span class="lines">@@ -279,8 +302,8 @@
</span><span class="cx"> %destructor { delete $$; } attrib class page_selector pseudo pseudo_page complex_selector complex_selector_with_trailing_whitespace compound_selector specifier specifier_list
</span><span class="cx">
</span><span class="cx"> %union { Vector<std::unique_ptr<CSSParserSelector>>* selectorList; }
</span><del>-%type <selectorList> selector_list simple_selector_list
-%destructor { delete $$; } selector_list simple_selector_list
</del><ins>+%type <selectorList> selector_list simple_selector_list nth_selector_ending
+%destructor { delete $$; } selector_list simple_selector_list nth_selector_ending
</ins><span class="cx">
</span><span class="cx"> %union { bool boolean; }
</span><span class="cx"> %type <boolean> declaration declaration_list decl_list priority
</span><span class="lines">@@ -1263,6 +1286,21 @@
</span><span class="cx"> $$ = CSSParserSelector::parsePagePseudoSelector($2);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+nth_selector_ending:
+ ')' {
+ $$ = nullptr;
+ }
+ | space ')' {
+ $$ = nullptr;
+ }
+ | space NTHCHILDSELECTORSEPARATOR space selector_list maybe_space ')' {
+ if ($4)
+ $$ = $4;
+ else
+ $$ = invalidSelectorVector;
+ }
+ ;
+
</ins><span class="cx"> pseudo:
</span><span class="cx"> ':' IDENT {
</span><span class="cx"> $$ = CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector($2);
</span><span class="lines">@@ -1292,6 +1330,48 @@
</span><span class="cx"> $$ = selector.release();
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ // Definition of :nth-child().
+ | ':' NTHCHILDFUNCTION maybe_space NTH nth_selector_ending {
+ $$ = nullptr;
+ if (isValidNthSelectorList($5)) {
+ auto selector = std::make_unique<CSSParserSelector>();
+ selector->setMatch(CSSSelector::PseudoClass);
+ selector->setArgument($4);
+ selector->setPseudoClassValue($2);
+ if ($5)
+ selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($5));
+ if (selector->pseudoClassType() == CSSSelector::PseudoClassNthChild)
+ $$ = selector.release();
+ }
+ }
+ | ':' NTHCHILDFUNCTION maybe_space maybe_unary_operator INTEGER nth_selector_ending {
+ $$ = nullptr;
+ if (isValidNthSelectorList($6)) {
+ auto selector = std::make_unique<CSSParserSelector>();
+ selector->setMatch(CSSSelector::PseudoClass);
+ selector->setArgument(AtomicString::number($4 * $5));
+ selector->setPseudoClassValue($2);
+ if ($6)
+ selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($6));
+ if (selector->pseudoClassType() == CSSSelector::PseudoClassNthChild)
+ $$ = selector.release();
+ }
+ }
+ | ':' NTHCHILDFUNCTION maybe_space IDENT nth_selector_ending {
+ $$ = nullptr;
+ if (isValidNthToken($4) && isValidNthSelectorList($5)) {
+ auto selector = std::make_unique<CSSParserSelector>();
+ selector->setMatch(CSSSelector::PseudoClass);
+ selector->setArgument($4);
+ selector->setPseudoClassValue($2);
+ if ($5)
+ selector->adoptSelectorVector(*std::unique_ptr<Vector<std::unique_ptr<CSSParserSelector>>>($5));
+ if (selector->pseudoClassType() == CSSSelector::PseudoClassNthChild)
+ $$ = selector.release();
+ }
+ }
+
</ins><span class="cx"> // used by :nth-*(ax+b)
</span><span class="cx"> | ':' FUNCTION maybe_space NTH maybe_space ')' {
</span><span class="cx"> $$ = nullptr;
</span><span class="lines">@@ -1330,6 +1410,7 @@
</span><span class="cx"> }
</span><span class="cx"> $$ = selector.release();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> // used by :not
</span><span class="cx"> | ':' NOTFUNCTION maybe_space compound_selector maybe_space ')' {
</span><span class="cx"> std::unique_ptr<CSSParserSelector> selector($4);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
</span><span class="cx"> * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
</span><del>- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
</span><span class="cx"> * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
</span><span class="cx"> * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
</span><span class="lines">@@ -10671,6 +10671,7 @@
</span><span class="cx">
</span><span class="cx"> case 9:
</span><span class="cx"> if (isEqualToCSSIdentifier(name, "nth-child")) {
</span><ins>+ m_token = NTHCHILDFUNCTION;
</ins><span class="cx"> m_parsingMode = NthChildMode;
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -11204,6 +11205,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+ if (m_parsingMode == NthChildMode && m_token == IDENT && yylval->string.length() == 2 && yylval->string.equalIgnoringCase("of")) {
+ m_parsingMode = NormalMode;
+ m_token = NTHCHILDSELECTORSEPARATOR;
+ }
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case CharacterDot:
</span><span class="lines">@@ -11478,6 +11483,10 @@
</span><span class="cx"> parseIdentifier(result, yylval->string, hasEscape);
</span><span class="cx"> m_token = IDENT;
</span><span class="cx"> }
</span><ins>+ if (m_parsingMode == NthChildMode && m_token == IDENT && yylval->string.length() == 2 && yylval->string.equalIgnoringCase("of")) {
+ m_parsingMode = NormalMode;
+ m_token = NTHCHILDSELECTORSEPARATOR;
+ }
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case CharacterXor:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.cpp        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSParserValues.cpp        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2005, 2006, 2008, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -286,6 +286,25 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static bool selectorListMatchesPseudoElement(const CSSSelectorList* selectorList)
+{
+ if (!selectorList)
+ return false;
+
+ for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) {
+ for (const CSSSelector* selector = subSelector; selector; selector = selector->tagHistory()) {
+ if (selector->matchesPseudoElement())
+ return true;
+ }
+ }
+ return false;
+}
+
+bool CSSParserSelector::matchesPseudoElement() const
+{
+ return m_selector->matchesPseudoElement() || selectorListMatchesPseudoElement(m_selector->selectorList());
+}
+
</ins><span class="cx"> void CSSParserSelector::insertTagHistory(CSSSelector::Relation before, std::unique_ptr<CSSParserSelector> selector, CSSSelector::Relation after)
</span><span class="cx"> {
</span><span class="cx"> if (m_tagHistory)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserValuesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParserValues.h (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParserValues.h        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSParserValues.h        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx"> * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
</span><del>- * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * This library is free software; you can redistribute it and/or
</span><span class="cx"> * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -217,6 +217,7 @@
</span><span class="cx">
</span><span class="cx"> bool isSimple() const;
</span><span class="cx"> bool hasShadowDescendant() const;
</span><ins>+ bool matchesPseudoElement() const;
</ins><span class="cx">
</span><span class="cx"> CSSParserSelector* tagHistory() const { return m_tagHistory.get(); }
</span><span class="cx"> void setTagHistory(std::unique_ptr<CSSParserSelector> selector) { m_tagHistory = WTF::move(selector); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.cpp (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.cpp        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSSelector.cpp        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> * 1999 Waldo Bastian (bastian@kde.org)
</span><span class="cx"> * 2001 Andreas Schlapbach (schlpbch@iam.unibe.ch)
</span><span class="cx"> * 2001-2003 Dirk Mueller (mueller@kde.org)
</span><del>- * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2008 David Smith (catfish.man@gmail.com)
</span><span class="cx"> * Copyright (C) 2010 Google Inc. All rights reserved.
</span><span class="cx"> *
</span><span class="lines">@@ -395,7 +395,21 @@
</span><span class="cx"> break;
</span><span class="cx"> case CSSSelector::PseudoClassNthChild:
</span><span class="cx"> str.appendLiteral(":nth-child(");
</span><del>- appendPseudoClassFunctionTail(str, cs);
</del><ins>+ str.append(cs->argument());
+#if ENABLE(CSS_SELECTORS_LEVEL4)
+ if (const CSSSelectorList* selectorList = cs->selectorList()) {
+ str.appendLiteral(" of ");
+ const CSSSelector* firstSubSelector = selectorList->first();
+ for (const CSSSelector* subSelector = firstSubSelector; subSelector; subSelector = CSSSelectorList::next(subSelector)) {
+ if (subSelector != firstSubSelector)
+ str.appendLiteral(", ");
+ str.append(subSelector->selectorText());
+ }
+ }
+#else
+ ASSERT(!cs->selectorList());
+#endif
+ str.append(')');
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::PseudoClassNthLastChild:
</span><span class="cx"> str.appendLiteral(":nth-last-child(");
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSSelector.h (173697 => 173698)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSSelector.h        2014-09-17 20:01:09 UTC (rev 173697)
+++ trunk/Source/WebCore/css/CSSSelector.h        2014-09-17 20:03:14 UTC (rev 173698)
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx"> const QualifiedName& attribute() const;
</span><span class="cx"> const AtomicString& attributeCanonicalLocalName() const;
</span><span class="cx"> const AtomicString& argument() const { return m_hasRareData ? m_data.m_rareData->m_argument : nullAtom; }
</span><del>- const CSSSelectorList* selectorList() const { return m_hasRareData ? m_data.m_rareData->m_selectorList.get() : 0; }
</del><ins>+ const CSSSelectorList* selectorList() const { return m_hasRareData ? m_data.m_rareData->m_selectorList.get() : nullptr; }
</ins><span class="cx">
</span><span class="cx"> void setValue(const AtomicString&);
</span><span class="cx"> void setAttribute(const QualifiedName&, bool isCaseInsensitive);
</span><span class="lines">@@ -273,8 +273,6 @@
</span><span class="cx"> bool isLastInTagHistory() const { return m_isLastInTagHistory; }
</span><span class="cx"> void setNotLastInTagHistory() { m_isLastInTagHistory = false; }
</span><span class="cx">
</span><del>- bool isSimple() const;
-
</del><span class="cx"> bool isForPage() const { return m_isForPage; }
</span><span class="cx"> void setForPage() { m_isForPage = true; }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>