No subject
Tue Jan 27 15:54:36 PST 2015
and generate the code. The new case-insensitive case is a simplified version
of the legacy HTML behavior without runtime check for the element type.
Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
fast/selectors/case-insensitive-attribute-register-requirement-1.html
fast/selectors/case-insensitive-attribute-register-requirement-2.html
fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
(WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
(WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
(WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
(WebCore::SelectorCompiler::constructFragmentsInternal):
Compute the type of value matching and store it on the AttributeMatchingInfo
when creating the fragment.
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
(WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
register. I have made an exception for generateElementAttributeValueExactMatching()
for simplicity. I use that register to load the StringImpl of the attribute
being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
the behavior is consistent between XML and HTML.
LayoutTests:
* fast/css/case-insensitive-attribute-with-svg-expected.html:
* fast/css/case-insensitive-attribute-with-svg.html:
* fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html.
* fast/css/implicitly-case-insensitive-attribute-with-svg.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg.html.
I renamed the HTML legacy case-insensitive behavior to separate
it from the new selector.
* fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt: Added.
* fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html: Added.
Mixing explicit case-insensitive with implicit.
* fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-1.html: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-2.html: Added.
The usual register allocation stress tests.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcsscaseinsensitiveattributewithsvgexpectedhtml">trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcsscaseinsensitiveattributewithsvghtml">trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssimplicitlycaseinsensitiveattributewithsvgexpectedhtml">trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssimplicitlycaseinsensitiveattributewithsvghtml">trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement1expectedtxt">trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement1html">trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement2expectedtxt">trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement2html">trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsquerySelectorexplicitcaseinsensitiveattributematchwithsvgexpectedtxt">trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsquerySelectorexplicitcaseinsensitiveattributematchwithsvghtml">trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (180543 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2015-02-24 03:25:26 UTC (rev 180543)
+++ trunk/LayoutTests/ChangeLog 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-02-23 Benjamin Poulain <benjamin at webkit.org>
+
+ CSS JIT: add support for case-insensitive attribute matching
+ https://bugs.webkit.org/show_bug.cgi?id=141880
+
+ Reviewed by Andreas Kling.
+
+ * fast/css/case-insensitive-attribute-with-svg-expected.html:
+ * fast/css/case-insensitive-attribute-with-svg.html:
+ * fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html.
+ * fast/css/implicitly-case-insensitive-attribute-with-svg.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg.html.
+
+ I renamed the HTML legacy case-insensitive behavior to separate
+ it from the new selector.
+
+ * fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt: Added.
+ * fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html: Added.
+ Mixing explicit case-insensitive with implicit.
+
+ * fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt: Added.
+ * fast/selectors/case-insensitive-attribute-register-requirement-1.html: Added.
+ * fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt: Added.
+ * fast/selectors/case-insensitive-attribute-register-requirement-2.html: Added.
+ The usual register allocation stress tests.
+
+
</ins><span class="cx"> 2015-02-23 Gyuyoung Kim <gyuyoung.kim at samsung.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, EFL gardening. Mark webgl tests to crash.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscaseinsensitiveattributewithsvgexpectedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html (180543 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html 2015-02-24 03:25:26 UTC (rev 180543)
+++ trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -1,14 +1,12 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<title>Case Insensitive and Case Sensitive Attribute matching</title>
</del><ins>+<title>Case Insensitive Attribute matching</title>
</ins><span class="cx"> </head>
</span><span class="cx"> <body>
</span><del>- <p>On success, there should be a large green surface visible and no red anywhere.</p>
</del><ins>+ <p>On success, there should be no red anywhere.</p>
</ins><span class="cx">
</span><span class="cx"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" style="margin-top:50px">
</span><del>- <rect x="50" y="0" width="50" height="50" style="fill:green" />
- <rect x="0" y="0" width="50" height="50" style="fill:green" />
</del><span class="cx"> </svg>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsscaseinsensitiveattributewithsvghtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg.html (180543 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg.html 2015-02-24 03:25:26 UTC (rev 180543)
+++ trunk/LayoutTests/fast/css/case-insensitive-attribute-with-svg.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><del>-<title>Case Insensitive and Case Sensitive Attribute matching</title>
</del><ins>+<title>Case Insensitive Attribute matching</title>
</ins><span class="cx"> <style>
</span><del>-[link=foobar], [lang=foobar] {
</del><ins>+[link=foobar I], [lang=foobar I] {
</ins><span class="cx"> display: none;
</span><span class="cx"> }
</span><span class="cx"> </style>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><del>- <p>On success, there should be a large green surface visible and no red anywhere.</p>
</del><ins>+ <p>On success, there should be no red anywhere.</p>
</ins><span class="cx"> <!-- None of these rects should appear, lang and link attribute matching is case insensitive for HTML documents. -->
</span><span class="cx"> <div style="background-color: red; position: absolute; left:0; width:50px; height:50px" lang="FooBar"></div>
</span><span class="cx"> <div style="background-color: red; position: absolute; left:50px; width:50px; height:50px" link="FooBar"></div>
</span><span class="lines">@@ -18,8 +18,8 @@
</span><span class="cx">
</span><span class="cx"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" style="margin-top:50px">
</span><span class="cx"> <!-- The first green rects should be visible, attribute matching is always case sensitive for XML or SVG documents. -->
</span><del>- <rect x="50" y="0" width="50" height="50" lang="FooBar" style="fill:green" />
- <rect x="0" y="0" width="50" height="50" link="FooBar" style="fill:green" />
</del><ins>+ <rect x="50" y="0" width="50" height="50" lang="FooBar" style="fill:red" />
+ <rect x="0" y="0" width="50" height="50" link="FooBar" style="fill:red" />
</ins><span class="cx"> <!-- These are regular match and should not appear. -->
</span><span class="cx"> <rect x="0" y="50" width="50" height="50" lang="foobar" style="fill:red" />
</span><span class="cx"> <rect x="50" y="50" width="50" height="50" link="foobar" style="fill:red" />
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssimplicitlycaseinsensitiveattributewithsvgexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,14 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>Case Insensitive and Case Sensitive Attribute matching</title>
+</head>
+<body>
+ <p>On success, there should be a large green surface visible and no red anywhere.</p>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" style="margin-top:50px">
+ <rect x="50" y="0" width="50" height="50" style="fill:green" />
+ <rect x="0" y="0" width="50" height="50" style="fill:green" />
+ </svg>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssimplicitlycaseinsensitiveattributewithsvghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg.html (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg.html (rev 0)
+++ trunk/LayoutTests/fast/css/implicitly-case-insensitive-attribute-with-svg.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title>Case Insensitive and Case Sensitive Attribute matching</title>
+<style>
+[link=foobar], [lang=foobar] {
+ display: none;
+}
+</style>
+</head>
+<body>
+ <p>On success, there should be a large green surface visible and no red anywhere.</p>
+ <!-- None of these rects should appear, lang and link attribute matching is case insensitive for HTML documents. -->
+ <div style="background-color: red; position: absolute; left:0; width:50px; height:50px" lang="FooBar"></div>
+ <div style="background-color: red; position: absolute; left:50px; width:50px; height:50px" link="FooBar"></div>
+ <div style="background-color: red; position: absolute; left:100px; width:50px; height:50px" lang="foobar"></div>
+ <div style="background-color: red; position: absolute; left:150px; width:50px; height:50px" link="foobar"></div>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" style="margin-top:50px">
+ <!-- The first green rects should be visible, attribute matching is always case sensitive for XML or SVG documents. -->
+ <rect x="50" y="0" width="50" height="50" lang="FooBar" style="fill:green" />
+ <rect x="0" y="0" width="50" height="50" link="FooBar" style="fill:green" />
+ <!-- These are regular match and should not appear. -->
+ <rect x="0" y="50" width="50" height="50" lang="foobar" style="fill:red" />
+ <rect x="50" y="50" width="50" height="50" link="foobar" style="fill:red" />
+ </svg>
+</body>
+</html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,1301 @@
</span><ins>+Check various cases of register pressure with case-insensitive attribute matching (e.g. [foo=bar i]).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing "[type=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type=foobar i]').length is 10
+PASS document.querySelectorAll('[type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]').length is 10
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i][type=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[attribute1=VALUE1 i]"
+-baseline:
+PASS document.querySelectorAll('[attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll('[attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))').length is 7
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[1].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[2].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[3].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[4].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[5].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i], #this-is-not-in-the-document))')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]"
+-baseline:
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll('[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll('testcase[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]').length is 7
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[1].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[2].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[3].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[4].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[5].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i]')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))').length is 7
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[1].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[2].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[3].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[4].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[5].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i][attribute1=VALUE1 i], #this-is-not-in-the-document))')[6].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type~=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type~=foobar i]').length is 10
+PASS document.querySelectorAll('[type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type~=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]').length is 10
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i][type~=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type|=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type|=foobar i]').length is 10
+PASS document.querySelectorAll('[type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type|=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]"
+-baseline:
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]').length is 10
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]').length is 10
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i][type|=foobar i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type^=foOba i]"
+-baseline:
+PASS document.querySelectorAll('[type^=foOba i]').length is 10
+PASS document.querySelectorAll('[type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type^=foOba i]').length is 10
+PASS document.querySelectorAll('testcase[type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]"
+-baseline:
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]').length is 10
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]').length is 10
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i][type^=foOba i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type$=oobAR i]"
+-baseline:
+PASS document.querySelectorAll('[type$=oobAR i]').length is 10
+PASS document.querySelectorAll('[type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type$=oobAR i]').length is 10
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]"
+-baseline:
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]').length is 10
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]').length is 10
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i][type$=oobAR i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type*=OOba i]"
+-baseline:
+PASS document.querySelectorAll('[type*=OOba i]').length is 10
+PASS document.querySelectorAll('[type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type*=OOba i]').length is 10
+PASS document.querySelectorAll('testcase[type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+Testing "[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]"
+-baseline:
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]').length is 10
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with tagname:
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]').length is 10
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll('testcase[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-with classes:
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]').length is 10
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[0].id is "testcase1"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[1].id is "testcase2"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[2].id is "testcase3"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[3].id is "testcase4"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[4].id is "testcase5"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[5].id is "testcase6"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[6].id is "testcase7"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[7].id is "testcase8"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[8].id is "testcase9"
+PASS document.querySelectorAll(':matches(.foo, .bar, .bazoo)[type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i]')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+-in functional pseudo classes:
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))').length is 10
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[0].id is "testcase1"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[1].id is "testcase2"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[2].id is "testcase3"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[3].id is "testcase4"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[4].id is "testcase5"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[5].id is "testcase6"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[6].id is "testcase7"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[7].id is "testcase8"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[8].id is "testcase9"
+PASS document.querySelectorAll(':nth-child(n of :matches([type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i][type*=OOba i], #this-is-not-in-the-document))')[9].id is "testcase10"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(10, 100, 200)"
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1.html (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-1.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<style>
+testcase {
+ background-color: red;
+}
+</style>
+<style id="style">
+</style>
+</head>
+<body>
+ <div style="display:none" id="test-root">
+ <testcase id="testcase1" type="foobar" attribute1="Value1" class="bar baz bazoo"></testcase>
+ <testcase id="testcase2" type="Foobar" class="bar baz bazoo" attribute2="value2"></testcase>
+ <testcase id="testcase3" type="FOOBAR" attribute1="value1" class="foo baz bazoo"></testcase>
+ <testcase id="testcase4" type="foobar" attribute1="vAlue1" class="foo bar bazoo"></testcase>
+ <testcase id="testcase5" type="Foobar" class="foo baz bazoo" attribute2="value2"></testcase>
+ <testcase id="testcase6" type="FOOBAR" attribute1="vaLue1" class="foo bar baz"></testcase>
+ <testcase id="testcase7" type="foobar" attribute1="valUe1" class="bar baz bazoo"></testcase>
+ <testcase id="testcase8" type="Foobar" attribute1="valuE1" class="foo baz bazoo"></testcase>
+ <testcase id="testcase9" type="FOOBAR" class="foo bar bazoo" attribute2="value2"></testcase>
+ <testcase id="testcase10" type="foobar" attribute1="value1" class="foo bar bazoo"></testcase>
+ </div>
+</body>
+<script>
+description('Check various cases of register pressure with case-insensitive attribute matching (e.g. [foo=bar i]).');
+
+function testQuerySelector(selector, expectedIds) {
+ shouldBe("document.querySelectorAll('" + selector + "').length", '' + expectedIds.length);
+ for (var i = 0; i < expectedIds.length; ++i)
+ shouldBeEqualToString("document.querySelectorAll('" + selector + "')[" + i + "].id", expectedIds[i]);
+}
+
+function testStyling(selector, expectedIds) {
+ var stylingElement = document.getElementById("style");
+ stylingElement.innerHTML = '' + selector + ' { background-color: rgb(10, 100, 200); }';
+
+ var allTestCases = document.querySelectorAll("#test-root *");
+ for (var i = 0; i < allTestCases.length; ++i) {
+ var expectMatch = expectedIds.indexOf(allTestCases[i].id) >= 0;
+ shouldBeEqualToString('getComputedStyle(document.querySelectorAll("#test-root *")[' + i + ']).backgroundColor', expectMatch ? 'rgb(10, 100, 200)' : 'rgb(255, 0, 0)');
+ }
+
+ stylingElement.innerHTML = '';
+}
+
+function testSelector(selector, expectedIds) {
+ testQuerySelector(selector, expectedIds);
+ testStyling(selector, expectedIds);
+}
+
+function testSelectorVariants(selector, expectedIds) {
+ debug("Testing \"" + selector + "\"");
+ debug("-baseline:");
+ testSelector(selector, expectedIds);
+ debug("");
+
+ debug("-with tagname:");
+ testSelector('testcase' + selector, expectedIds);
+ debug("");
+
+ debug("-with classes:");
+ testSelector(':matches(.foo, .bar, .bazoo)' + selector, expectedIds);
+ debug("");
+
+ debug("-in functional pseudo classes:");
+ testSelector(':nth-child(n of :matches(' + selector + ', #this-is-not-in-the-document))', expectedIds);
+ debug("");
+
+
+ debug("");
+}
+
+var simpleCases = [
+ ["[type=foobar i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+ ["[attribute1=VALUE1 i]",["testcase1", "testcase3", "testcase4", "testcase6", "testcase7", "testcase8", "testcase10"]],
+ ["[type~=foobar i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+ ["[type|=foobar i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+ ["[type^=foOba i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+ ["[type$=oobAR i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+ ["[type*=OOba i]",["testcase1", "testcase2", "testcase3", "testcase4", "testcase5", "testcase6", "testcase7", "testcase8", "testcase9", "testcase10"]],
+];
+
+for (var testCase of simpleCases) {
+ testSelectorVariants(testCase[0], testCase[1]);
+
+ var repeatedSelector = testCase[0];
+ for (var i = 0; i < 20; ++i) {
+ repeatedSelector += testCase[0];
+ }
+ testSelectorVariants(repeatedSelector, testCase[1]);
+}
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement2expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,393 @@
</span><ins>+Check various cases of register pressure with case-insensitive attribute matching (e.g. [foo=bar i]).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing "[type=foobar i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type=foobar i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[attribute1=VALUE1 i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type=foobar i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type=foobar i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type=foobar i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type~=fOobar i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type~=fOobar i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type~=foObar i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type~=foObar i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type~=foobar i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type~=foobar i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type|=foObar i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type|=foObar i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type|=fooBar i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type|=fooBar i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type|=foobar i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type|=foobar i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type^=fooBa i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type^=fooBa i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type^=fOoba i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type^=fOoba i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type^=fooba i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type^=fooba i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type$=oobAr i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type$=oobAr i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type$=oObar i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type$=oObar i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type$=oobar i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type$=oobar i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type*=oOba i] > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase').length is 8
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[0].id is "innertestcase1"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[1].id is "innertestcase2"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[2].id is "innertestcase3"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[3].id is "innertestcase4"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[4].id is "innertestcase5"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[5].id is "innertestcase6"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[6].id is "innertestcase7"
+PASS document.querySelectorAll('[type*=oOba i] > * > * >> innerTestCase')[7].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type*=ooBa i] ~ * ~ * >> innerTestCase"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type*=ooBa i] ~ * ~ * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+Testing "[type*=ooba i] ~ * ~ * > * > * >> innerTestCase"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase').length is 7
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[0].id is "innertestcase2"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[1].id is "innertestcase3"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[2].id is "innertestcase4"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[3].id is "innertestcase5"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[4].id is "innertestcase6"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[5].id is "innertestcase7"
+PASS document.querySelectorAll('[type*=ooba i] ~ * ~ * > * > * >> innerTestCase')[6].id is "innertestcase8"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[0]).backgroundColor is "rgb(255, 0, 0)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[1]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[2]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[3]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[4]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[5]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[6]).backgroundColor is "rgb(10, 100, 200)"
+PASS getComputedStyle(document.querySelectorAll("innerTestCase")[7]).backgroundColor is "rgb(10, 100, 200)"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorscaseinsensitiveattributeregisterrequirement2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2.html (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/case-insensitive-attribute-register-requirement-2.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,91 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+<style>
+innerTestCase {
+ background-color: red;
+}
+</style>
+<style id="style">
+</style>
+</head>
+<body>
+ <div style="display:none" id="test-root">
+ <testcase type="foobar" attribute1="Value1"><span><span><span><span><span><innerTestCase id="innertestcase1"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="Foobar"></testcase>
+ <testcase type="FOOBAR" attribute1="value1"><span><span><span><span><span><innerTestCase id="innertestcase2"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="foobar" attribute1="vAlue1"><span><span><span><span><span><innerTestCase id="innertestcase3"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="Foobar"><span><span><span><span><span><innerTestCase id="innertestcase4"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="FOOBAR" attribute1="vaLue1"><span><span><span><span><span><innerTestCase id="innertestcase5"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="foobar" attribute1="valUe1"><span><span><span><span><span><innerTestCase id="innertestcase6"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="Foobar" attribute1="valuE1"><span><span><span><span><span><innerTestCase id="innertestcase7"></innerTestCase></span></span></span></span></span></testcase>
+ <testcase type="FOOBAR"></testcase>
+ <testcase type="foobar" attribute1="value1"><span><span><span><span><span><innerTestCase id="innertestcase8"></innerTestCase></span></span></span></span></span></testcase>
+ </div>
+</body>
+<script>
+description('Check various cases of register pressure with case-insensitive attribute matching (e.g. [foo=bar i]).');
+
+function testQuerySelector(selector, expectedIds) {
+ shouldBe("document.querySelectorAll('" + selector + "').length", '' + expectedIds.length);
+ for (var i = 0; i < expectedIds.length; ++i)
+ shouldBeEqualToString("document.querySelectorAll('" + selector + "')[" + i + "].id", expectedIds[i]);
+}
+
+function testStyling(selector, expectedIds) {
+ var stylingElement = document.getElementById("style");
+ stylingElement.innerHTML = '' + selector + ' { background-color: rgb(10, 100, 200); }';
+
+ var allTestCases = document.querySelectorAll("innerTestCase");
+ for (var i = 0; i < allTestCases.length; ++i) {
+ var expectMatch = expectedIds.indexOf(allTestCases[i].id) >= 0;
+ shouldBeEqualToString('getComputedStyle(document.querySelectorAll("innerTestCase")[' + i + ']).backgroundColor', expectMatch ? 'rgb(10, 100, 200)' : 'rgb(255, 0, 0)');
+ }
+
+ // stylingElement.innerHTML = '';
+}
+
+function testSelector(selector, expectedIds) {
+ debug("Testing \"" + selector + "\"");
+ testQuerySelector(selector, expectedIds);
+ testStyling(selector, expectedIds);
+ debug("");
+}
+
+var simpleCases = [
+ ["[type=foobar i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[attribute1=VALUE1 i] > * > * >> innerTestCase",["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type=foobar i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[attribute1=VALUE1 i] ~ * ~ * >> innerTestCase",["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type=foobar i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[attribute1=VALUE1 i] ~ * ~ * > * > * >> innerTestCase",["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+
+ ["[type~=fOobar i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type~=foObar i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type~=foobar i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+
+ ["[type|=foObar i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type|=fooBar i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type|=foobar i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+
+ ["[type^=fooBa i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type^=fOoba i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type^=fooba i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+
+ ["[type$=oobAr i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type$=oObar i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type$=oobar i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+
+ ["[type*=oOba i] > * > * >> innerTestCase", ["innertestcase1", "innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type*=ooBa i] ~ * ~ * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+ ["[type*=ooba i] ~ * ~ * > * > * >> innerTestCase", ["innertestcase2", "innertestcase3", "innertestcase4", "innertestcase5", "innertestcase6", "innertestcase7", "innertestcase8"]],
+];
+
+for (var testCase of simpleCases) {
+ testSelector(testCase[0], testCase[1]);
+}
+
+</script>
+<script src="../../resources/js-test-post.js"></script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsquerySelectorexplicitcaseinsensitiveattributematchwithsvgexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Some attribute needs case insensitive value matching with HTML, they should not match XML elements like SVG. On the other hand, explicitely case-insensitive selector should match SVG.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.querySelectorAll("[lang=foobar]").length is 3
+PASS document.querySelectorAll("[lang=foobar]")[0].id is "div1"
+PASS document.querySelectorAll("[lang=foobar]")[1].id is "div3"
+PASS document.querySelectorAll("[lang=foobar]")[2].id is "rect3"
+PASS document.querySelectorAll("[lang=foobar i]").length is 4
+PASS document.querySelectorAll("[lang=foobar i]")[0].id is "div1"
+PASS document.querySelectorAll("[lang=foobaR i]")[1].id is "div3"
+PASS document.querySelectorAll("[lang=Foobar i]")[2].id is "rect1"
+PASS document.querySelectorAll("[lang=FOOBAR i]")[3].id is "rect3"
+PASS document.querySelectorAll("[link=foobar]").length is 3
+PASS document.querySelectorAll("[link=foobar]")[0].id is "div2"
+PASS document.querySelectorAll("[link=foobar]")[1].id is "div4"
+PASS document.querySelectorAll("[link=foobar]")[2].id is "rect4"
+PASS document.querySelectorAll("[link=foobar i]").length is 4
+PASS document.querySelectorAll("[link=foobar i]")[0].id is "div2"
+PASS document.querySelectorAll("[link=FOOBAR i]")[1].id is "div4"
+PASS document.querySelectorAll("[link=foobaR i]")[2].id is "rect2"
+PASS document.querySelectorAll("[link=Foobar i]")[3].id is "rect4"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsquerySelectorexplicitcaseinsensitiveattributematchwithsvghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html (0 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html (rev 0)
+++ trunk/LayoutTests/fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+<!doctype html>
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<div style="display:none">
+ <div id=div1 style="background-color: red; position: absolute; left:0; width:50px; height:50px" lang="FooBar"></div>
+ <div id=div2 style="background-color: red; position: absolute; left:50px; width:50px; height:50px" link="FooBar"></div>
+ <div id=div3 style="background-color: red; position: absolute; left:100px; width:50px; height:50px" lang="foobar"></div>
+ <div id=div4 style="background-color: red; position: absolute; left:150px; width:50px; height:50px" link="foobar"></div>
+
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100 100" style="margin-top:50px">
+ <rect id=rect1 x="50" y="0" width="50" height="50" lang="FooBar" style="fill:green" />
+ <rect id=rect2 x="0" y="0" width="50" height="50" link="FooBar" style="fill:green" />
+ <rect id=rect3 x="0" y="50" width="50" height="50" lang="foobar" style="fill:red" />
+ <rect id=rect4 x="50" y="50" width="50" height="50" link="foobar" style="fill:red" />
+ </svg>
+</div>
+</body>
+<script>
+description('Some attribute needs case insensitive value matching with HTML, they should not match XML elements like SVG. On the other hand, explicitely case-insensitive selector should match SVG.');
+
+shouldBe('document.querySelectorAll("[lang=foobar]").length', '3');
+shouldBeEqualToString('document.querySelectorAll("[lang=foobar]")[0].id', 'div1');
+shouldBeEqualToString('document.querySelectorAll("[lang=foobar]")[1].id', 'div3');
+shouldBeEqualToString('document.querySelectorAll("[lang=foobar]")[2].id', 'rect3');
+
+shouldBe('document.querySelectorAll("[lang=foobar i]").length', '4');
+shouldBeEqualToString('document.querySelectorAll("[lang=foobar i]")[0].id', 'div1');
+shouldBeEqualToString('document.querySelectorAll("[lang=foobaR i]")[1].id', 'div3');
+shouldBeEqualToString('document.querySelectorAll("[lang=Foobar i]")[2].id', 'rect1');
+shouldBeEqualToString('document.querySelectorAll("[lang=FOOBAR i]")[3].id', 'rect3');
+
+shouldBe('document.querySelectorAll("[link=foobar]").length', '3');
+shouldBeEqualToString('document.querySelectorAll("[link=foobar]")[0].id', 'div2');
+shouldBeEqualToString('document.querySelectorAll("[link=foobar]")[1].id', 'div4');
+shouldBeEqualToString('document.querySelectorAll("[link=foobar]")[2].id', 'rect4');
+
+shouldBe('document.querySelectorAll("[link=foobar i]").length', '4');
+shouldBeEqualToString('document.querySelectorAll("[link=foobar i]")[0].id', 'div2');
+shouldBeEqualToString('document.querySelectorAll("[link=FOOBAR i]")[1].id', 'div4');
+shouldBeEqualToString('document.querySelectorAll("[link=foobaR i]")[2].id', 'rect2');
+shouldBeEqualToString('document.querySelectorAll("[link=Foobar i]")[3].id', 'rect4');
+</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 (180543 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog 2015-02-24 03:25:26 UTC (rev 180543)
+++ trunk/Source/WebCore/ChangeLog 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2015-02-23 Benjamin Poulain <benjamin at webkit.org>
+
+ CSS JIT: add support for case-insensitive attribute matching
+ https://bugs.webkit.org/show_bug.cgi?id=141880
+
+ Reviewed by Andreas Kling.
+
+ The value matching now has 3 cases:
+ 1) Case-sensitive.
+ 2) Case-insensitive.
+ 3) Legacy HTML Case-insensitive.
+
+ The information to determine the case is split over 2 source:
+ -To know if explicit case-insensitive is needed, we need to ask the selector
+ for attributeValueMatchingIsCaseInsensitive().
+ -To know if the legacy HTML behavior is needed, we need to test the attribute
+ name filter with HTMLDocument::isCaseSensitiveAttribute().
+
+ I decided to perform all those checks at the fragment creation step.
+ This makes the register requirements and code generation more explicit.
+
+ From there, everything is easy: switch() on the type of matching needed,
+ and generate the code. The new case-insensitive case is a simplified version
+ of the legacy HTML behavior without runtime check for the element type.
+
+ Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
+ fast/selectors/case-insensitive-attribute-register-requirement-1.html
+ fast/selectors/case-insensitive-attribute-register-requirement-2.html
+ fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
+
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
+ (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
+ (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
+ (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
+ (WebCore::SelectorCompiler::constructFragmentsInternal):
+ Compute the type of value matching and store it on the AttributeMatchingInfo
+ when creating the fragment.
+
+ (WebCore::SelectorCompiler::minimumRegisterRequirements):
+ (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
+ (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
+ In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
+ register. I have made an exception for generateElementAttributeValueExactMatching()
+ for simplicity. I use that register to load the StringImpl of the attribute
+ being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
+
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
+ Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
+ the behavior is consistent between XML and HTML.
+
</ins><span class="cx"> 2015-02-23 Alex Christensen <achristensen at webkit.org>
</span><span class="cx">
</span><span class="cx"> [WinCairo] Unreviewed build fix after r180532
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (180543 => 180544)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2015-02-24 03:25:26 UTC (rev 180543)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2015-02-24 03:31:08 UTC (rev 180544)
</span><span class="lines">@@ -112,20 +112,45 @@
</span><span class="cx"> Visited
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+enum class AttributeCaseSensitivity {
+ CaseSensitive,
+ // Some values are matched case-insensitively for HTML elements.
+ // That is a legacy behavior decided by HTMLDocument::isCaseSensitiveAttribute().
+ HTMLLegacyCaseInsensitive,
+ CaseInsensitive
+};
+
+static AttributeCaseSensitivity attributeSelectorCaseSensitivity(const CSSSelector& selector)
+{
+ ASSERT(selector.isAttributeSelector());
+
+ // This is by convention, the case is irrelevant for Set.
+ if (selector.match() == CSSSelector::Set)
+ return AttributeCaseSensitivity::CaseSensitive;
+
+ if (selector.attributeValueMatchingIsCaseInsensitive())
+ return AttributeCaseSensitivity::CaseInsensitive;
+ if (HTMLDocument::isCaseSensitiveAttribute(selector.attribute()))
+ return AttributeCaseSensitivity::CaseSensitive;
+ return AttributeCaseSensitivity::HTMLLegacyCaseInsensitive;
+}
+
</ins><span class="cx"> class AttributeMatchingInfo {
</span><span class="cx"> public:
</span><del>- AttributeMatchingInfo(const CSSSelector* selector, bool canDefaultToCaseSensitiveValueMatch)
- : m_selector(selector)
- , m_canDefaultToCaseSensitiveValueMatch(canDefaultToCaseSensitiveValueMatch)
</del><ins>+ explicit AttributeMatchingInfo(const CSSSelector& selector)
+ : m_selector(&selector)
+ , m_attributeCaseSensitivity(attributeSelectorCaseSensitivity(selector))
</ins><span class="cx"> {
</span><ins>+ ASSERT(!(m_attributeCaseSensitivity == AttributeCaseSensitivity::CaseInsensitive && !selector.attributeValueMatchingIsCaseInsensitive()));
+ ASSERT(!(selector.match() == CSSSelector::Set && m_attributeCaseSensitivity != AttributeCaseSensitivity::CaseSensitive));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- bool canDefaultToCaseSensitiveValueMatch() const { return m_canDefaultToCaseSensitiveValueMatch; }
</del><ins>+ AttributeCaseSensitivity attributeCaseSensitivity() const { return m_attributeCaseSensitivity; }
</ins><span class="cx"> const CSSSelector& selector() const { return *m_selector; }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> const CSSSelector* m_selector;
</span><del>- bool m_canDefaultToCaseSensitiveValueMatch;
</del><ins>+ AttributeCaseSensitivity m_attributeCaseSensitivity;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> static const unsigned invalidHeight = std::numeric_limits<unsigned>::max();
</span><span class="lines">@@ -287,8 +312,8 @@
</span><span class="cx"> void generateElementAttributesMatching(Assembler::JumpList& failureCases, const LocalRegister& elementDataAddress, const SelectorFragment&);
</span><span class="cx"> void generateElementAttributeMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, Assembler::RegisterID decIndexRegister, const AttributeMatchingInfo& attributeInfo);
</span><span class="cx"> void generateElementAttributeValueMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AttributeMatchingInfo& attributeInfo);
</span><del>- void generateElementAttributeValueExactMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, bool caseSensitive);
- void generateElementAttributeFunctionCallValueMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, bool caseSensitive, JSC::FunctionPtr caseSensitiveTest, JSC::FunctionPtr caseInsensitiveTest);
</del><ins>+ void generateElementAttributeValueExactMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, AttributeCaseSensitivity valueCaseSensitivity);
+ void generateElementAttributeFunctionCallValueMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, AttributeCaseSensitivity valueCaseSensitivity, JSC::FunctionPtr caseSensitiveTest, JSC::FunctionPtr caseInsensitiveTest);
</ins><span class="cx"> void generateElementHasTagName(Assembler::JumpList& failureCases, const CSSSelector& tagMatchingSelector);
</span><span class="cx"> void generateElementHasId(Assembler::JumpList& failureCases, const LocalRegister& elementDataAddress, const AtomicString& idToMatch);
</span><span class="cx"> void generateElementHasClasses(Assembler::JumpList& failureCases, const LocalRegister& elementDataAddress, const Vector<const AtomicStringImpl*>& classNames);
</span><span class="lines">@@ -996,15 +1021,13 @@
</span><span class="cx"> FALLTHROUGH;
</span><span class="cx"> case CSSSelector::Exact:
</span><span class="cx"> case CSSSelector::Hyphen:
</span><del>- if (selector->attributeValueMatchingIsCaseInsensitive())
- return FunctionType::CannotCompile;
</del><span class="cx"> fragment->onlyMatchesLinksInQuirksMode = false;
</span><del>- fragment->attributes.append(AttributeMatchingInfo(selector, HTMLDocument::isCaseSensitiveAttribute(selector->attribute())));
</del><ins>+ fragment->attributes.append(AttributeMatchingInfo(*selector));
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case CSSSelector::Set:
</span><span class="cx"> fragment->onlyMatchesLinksInQuirksMode = false;
</span><del>- fragment->attributes.append(AttributeMatchingInfo(selector, true));
</del><ins>+ fragment->attributes.append(AttributeMatchingInfo(*selector));
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::PagePseudoClass:
</span><span class="cx"> fragment->onlyMatchesLinksInQuirksMode = false;
</span><span class="lines">@@ -1068,9 +1091,17 @@
</span><span class="cx"> return attributeSelector.attribute().prefix() != starAtom && !attributeSelector.attribute().namespaceURI().isNull();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline bool attributeValueTestingRequiresCaseFoldingRegister(const AttributeMatchingInfo& attributeInfo)
</del><ins>+static inline bool attributeValueTestingRequiresExtraRegister(const AttributeMatchingInfo& attributeInfo)
</ins><span class="cx"> {
</span><del>- return !attributeInfo.canDefaultToCaseSensitiveValueMatch();
</del><ins>+ switch (attributeInfo.attributeCaseSensitivity()) {
+ case AttributeCaseSensitivity::CaseSensitive:
+ return false;
+ case AttributeCaseSensitivity::HTMLLegacyCaseInsensitive:
+ return true;
+ case AttributeCaseSensitivity::CaseInsensitive:
+ return attributeInfo.selector().match() == CSSSelector::Exact;
+ }
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Element + ElementData + a pointer to values + an index on that pointer + the value we expect;
</span><span class="lines">@@ -1098,7 +1129,7 @@
</span><span class="cx"> const AttributeMatchingInfo& attributeInfo = attributes[attributeIndex];
</span><span class="cx"> const CSSSelector& attributeSelector = attributeInfo.selector();
</span><span class="cx"> if (attributeNameTestingRequiresNamespaceRegister(attributeSelector)
</span><del>- || attributeValueTestingRequiresCaseFoldingRegister(attributeInfo))
</del><ins>+ || attributeValueTestingRequiresExtraRegister(attributeInfo))
</ins><span class="cx"> attributeMinimum += 1;
</span><span class="cx">
</span><span class="cx"> minimum = std::max(minimum, attributeMinimum);
</span><span class="lines">@@ -2873,26 +2904,26 @@
</span><span class="cx"> const CSSSelector& attributeSelector = attributeInfo.selector();
</span><span class="cx"> const AtomicString& expectedValue = attributeSelector.value();
</span><span class="cx"> ASSERT(!expectedValue.isNull());
</span><del>- bool defaultToCaseSensitiveValueMatch = attributeInfo.canDefaultToCaseSensitiveValueMatch();
</del><ins>+ AttributeCaseSensitivity valueCaseSensitivity = attributeInfo.attributeCaseSensitivity();
</ins><span class="cx">
</span><span class="cx"> switch (attributeSelector.match()) {
</span><span class="cx"> case CSSSelector::Begin:
</span><del>- generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueBeginsWith<CaseSensitive>, attributeValueBeginsWith<CaseInsensitive>);
</del><ins>+ generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity, attributeValueBeginsWith<CaseSensitive>, attributeValueBeginsWith<CaseInsensitive>);
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::Contain:
</span><del>- generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueContains<CaseSensitive>, attributeValueContains<CaseInsensitive>);
</del><ins>+ generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity, attributeValueContains<CaseSensitive>, attributeValueContains<CaseInsensitive>);
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::End:
</span><del>- generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueEndsWith<CaseSensitive>, attributeValueEndsWith<CaseInsensitive>);
</del><ins>+ generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity, attributeValueEndsWith<CaseSensitive>, attributeValueEndsWith<CaseInsensitive>);
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::Exact:
</span><del>- generateElementAttributeValueExactMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch);
</del><ins>+ generateElementAttributeValueExactMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity);
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::Hyphen:
</span><del>- generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueMatchHyphenRule<CaseSensitive>, attributeValueMatchHyphenRule<CaseInsensitive>);
</del><ins>+ generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity, attributeValueMatchHyphenRule<CaseSensitive>, attributeValueMatchHyphenRule<CaseInsensitive>);
</ins><span class="cx"> break;
</span><span class="cx"> case CSSSelector::List:
</span><del>- generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, defaultToCaseSensitiveValueMatch, attributeValueSpaceSeparetedListContains<CaseSensitive>, attributeValueSpaceSeparetedListContains<CaseInsensitive>);
</del><ins>+ generateElementAttributeFunctionCallValueMatching(failureCases, currentAttributeAddress, expectedValue, valueCaseSensitivity, attributeValueSpaceSeparetedListContains<CaseSensitive>, attributeValueSpaceSeparetedListContains<CaseInsensitive>);
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -2904,14 +2935,17 @@
</span><span class="cx"> return assembler.branchTest32(condition, Assembler::Address(documentAddress, Document::documentClassesMemoryOffset()), Assembler::TrustedImm32(Document::isHTMLDocumentClassFlag()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SelectorCodeGenerator::generateElementAttributeValueExactMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, bool canDefaultToCaseSensitiveValueMatch)
</del><ins>+void SelectorCodeGenerator::generateElementAttributeValueExactMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, AttributeCaseSensitivity valueCaseSensitivity)
</ins><span class="cx"> {
</span><span class="cx"> LocalRegisterWithPreference expectedValueRegister(m_registerAllocator, JSC::GPRInfo::argumentGPR1);
</span><span class="cx"> m_assembler.move(Assembler::TrustedImmPtr(expectedValue.impl()), expectedValueRegister);
</span><span class="cx">
</span><del>- if (canDefaultToCaseSensitiveValueMatch)
</del><ins>+ switch (valueCaseSensitivity) {
+ case AttributeCaseSensitivity::CaseSensitive: {
</ins><span class="cx"> failureCases.append(m_assembler.branchPtr(Assembler::NotEqual, Assembler::Address(currentAttributeAddress, Attribute::valueMemoryOffset()), expectedValueRegister));
</span><del>- else {
</del><ins>+ break;
+ }
+ case AttributeCaseSensitivity::HTMLLegacyCaseInsensitive: {
</ins><span class="cx"> Assembler::Jump skipCaseInsensitiveComparison = m_assembler.branchPtr(Assembler::Equal, Assembler::Address(currentAttributeAddress, Attribute::valueMemoryOffset()), expectedValueRegister);
</span><span class="cx">
</span><span class="cx"> // If the element is an HTML element, in a HTML dcoument (not including XHTML), value matching is case insensitive.
</span><span class="lines">@@ -2934,20 +2968,38 @@
</span><span class="cx"> failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
</span><span class="cx">
</span><span class="cx"> skipCaseInsensitiveComparison.link(&m_assembler);
</span><ins>+ break;
</ins><span class="cx"> }
</span><ins>+ case AttributeCaseSensitivity::CaseInsensitive: {
+ LocalRegister valueStringImpl(m_registerAllocator);
+ m_assembler.loadPtr(Assembler::Address(currentAttributeAddress, Attribute::valueMemoryOffset()), valueStringImpl);
+
+ Assembler::Jump skipCaseInsensitiveComparison = m_assembler.branchPtr(Assembler::Equal, valueStringImpl, expectedValueRegister);
+ FunctionCall functionCall(m_assembler, m_registerAllocator, m_stackAllocator, m_functionCalls);
+ functionCall.setFunctionAddress(WTF::equalIgnoringCaseNonNull);
+ functionCall.setTwoArguments(valueStringImpl, expectedValueRegister);
+ failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
+ skipCaseInsensitiveComparison.link(&m_assembler);
+ break;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, bool canDefaultToCaseSensitiveValueMatch, JSC::FunctionPtr caseSensitiveTest, JSC::FunctionPtr caseInsensitiveTest)
</del><ins>+void SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching(Assembler::JumpList& failureCases, Assembler::RegisterID currentAttributeAddress, const AtomicString& expectedValue, AttributeCaseSensitivity valueCaseSensitivity, JSC::FunctionPtr caseSensitiveTest, JSC::FunctionPtr caseInsensitiveTest)
</ins><span class="cx"> {
</span><span class="cx"> LocalRegisterWithPreference expectedValueRegister(m_registerAllocator, JSC::GPRInfo::argumentGPR1);
</span><span class="cx"> m_assembler.move(Assembler::TrustedImmPtr(expectedValue.impl()), expectedValueRegister);
</span><span class="cx">
</span><del>- if (canDefaultToCaseSensitiveValueMatch) {
</del><ins>+
+ switch (valueCaseSensitivity) {
+ case AttributeCaseSensitivity::CaseSensitive: {
</ins><span class="cx"> FunctionCall functionCall(m_assembler, m_registerAllocator, m_stackAllocator, m_functionCalls);
</span><span class="cx"> functionCall.setFunctionAddress(caseSensitiveTest);
</span><span class="cx"> functionCall.setTwoArguments(currentAttributeAddress, expectedValueRegister);
</span><span class="cx"> failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
</span><del>- } else {
</del><ins>+ break;
+ }
+ case AttributeCaseSensitivity::HTMLLegacyCaseInsensitive: {
</ins><span class="cx"> Assembler::JumpList shouldUseCaseSensitiveComparison;
</span><span class="cx"> shouldUseCaseSensitiveComparison.append(testIsHTMLFlagOnNode(Assembler::Zero, m_assembler, elementAddressRegister));
</span><span class="cx"> {
</span><span class="lines">@@ -2977,7 +3029,16 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> skipCaseSensitiveCase.link(&m_assembler);
</span><ins>+ break;
</ins><span class="cx"> }
</span><ins>+ case AttributeCaseSensitivity::CaseInsensitive: {
+ FunctionCall functionCall(m_assembler, m_registerAllocator, m_stackAllocator, m_functionCalls);
+ functionCall.setFunctionAddress(caseInsensitiveTest);
+ functionCall.setTwoArguments(currentAttributeAddress, expectedValueRegister);
+ failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
+ break;
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SelectorCodeGenerator::generateElementFunctionCallTest(Assembler::JumpList& failureCases, JSC::FunctionPtr testFunction)
</span></span></pre>
</div>
</div>
</body>
</html>
More information about the webkit-changes
mailing list