<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181845] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181845">181845</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2015-03-22 22:04:46 -0700 (Sun, 22 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>CSS Selectors: fix attribute case-insensitive matching of Contain and List
https://bugs.webkit.org/show_bug.cgi?id=142932

Reviewed by Darin Adler.

Source/WebCore:

Fix the last two attribute selectors that were using full case-insensitive
match:
    -Contain ([foo*=bar]).
    -List (foo~=bar]).

Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
       fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html

* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::attributeValueContains):
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):

Source/WTF:

Add some utility functions to the string classes to find substrings
using ASCII case-insensitive comparisons.

* wtf/text/AtomicString.h:
(WTF::AtomicString::contains):
Add the light version that only lock one register.

(WTF::AtomicString::containsIgnoringASCIICase):
(WTF::AtomicString::findIgnoringASCIICase):

* wtf/text/StringCommon.h:
(WTF::findIgnoringASCIICase):
This is the common implementation used by StringView and StringImpl.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findIgnoringASCIICase):
* wtf/text/StringImpl.h:
* wtf/text/StringView.cpp:
(WTF::StringView::containsIgnoringASCIICase):
(WTF::StringView::findIgnoringASCIICase):
* wtf/text/StringView.h:
* wtf/text/WTFString.h:
(WTF::String::findIgnoringASCIICase):
(WTF::String::contains):
(WTF::String::containsIgnoringASCIICase):

Tools:

Add tests for the new features and fix some existing tests using the
stringFromUTF8() utility recently added by Dhi.

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::stringFromUTF8):
* TestWebKitAPI/Tests/WTF/StringView.cpp:

LayoutTests:

* fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html: Added.
* fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt: Added.
* fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringh">trunk/Source/WTF/wtf/text/AtomicString.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringCommonh">trunk/Source/WTF/wtf/text/StringCommon.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringImplcpp">trunk/Source/WTF/wtf/text/StringImpl.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextStringImplh">trunk/Source/WTF/wtf/text/StringImpl.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringViewcpp">trunk/Source/WTF/wtf/text/StringView.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextStringViewh">trunk/Source/WTF/wtf/text/StringView.h</a></li>
<li><a href="#trunkSourceWTFwtftextWTFStringh">trunk/Source/WTF/wtf/text/WTFString.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssSelectorCheckercpp">trunk/Source/WebCore/css/SelectorChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorecssjitSelectorCompilercpp">trunk/Source/WebCore/cssjit/SelectorCompiler.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFStringImplcpp">trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFStringViewcpp">trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastselectorsattributecontainsvaluematchingisasciicaseinsensitiveexpectedtxt">trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsattributecontainsvaluematchingisasciicaseinsensitivehtml">trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html</a></li>
<li><a href="#trunkLayoutTestsfastselectorsattributelistvaluematchingisasciicaseinsensitiveexpectedtxt">trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastselectorsattributelistvaluematchingisasciicaseinsensitivehtml">trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/LayoutTests/ChangeLog        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-03-22  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        CSS Selectors: fix attribute case-insensitive matching of Contain and List
+        https://bugs.webkit.org/show_bug.cgi?id=142932
+
+        Reviewed by Darin Adler.
+
+        * fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt: Added.
+        * fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html: Added.
+        * fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt: Added.
+        * fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html: Added.
+
</ins><span class="cx"> 2015-03-22  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Update new flaky tests and remove duplicated failure test.
</span></span></pre></div>
<a id="trunkLayoutTestsfastselectorsattributecontainsvaluematchingisasciicaseinsensitiveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt (0 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -0,0 +1,417 @@
</span><ins>+When matching attributes case insensitively, it should be ASCII case insensitive. This test verifies the behavior when matching substring anywhere in the values (e.g. [a*=&quot;b&quot;])
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Testing &quot;[data-attribute*=Web-É-Kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit]')[0].id is &quot;target1&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=b-É-K]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-K]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-K]')[0].id is &quot;target1&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=web-É-kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit]')[0].id is &quot;target2&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=b-É-k]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k]')[0].id is &quot;target2&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=WEB-É-KIT]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT]')[0].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=B-É-K]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K]')[0].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=Web-é-Kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-é-Kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-é-Kit]')[0].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=b-é-K]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-K]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-K]')[0].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=web-é-kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-é-kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=web-é-kit]')[0].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute*=b-é-k]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k]')[0].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute*=Web-É-Kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-É-Kit i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=b-É-k i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=web-É-kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-É-kit i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=b-É-k i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-É-k i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=WEB-É-KIT i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=WEB-É-KIT i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=B-É-K i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=B-É-K i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute*=Web-é-Kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-é-Kit i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-é-Kit i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=Web-é-Kit i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute*=b-é-k i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute*=web-é-kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-é-kit i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute*=web-é-kit i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=web-é-kit i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute*=b-é-k i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute*=b-é-k i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=WEB-é-KIT]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=B-é-K]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=Web-é-Kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=b-é-k]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-k]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=b-é-k]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-k]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-k]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=Web-é-kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=b-é-K]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=web-É-kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=b-É-K]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=web-É-Kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=b-É-k]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=WEB-é-KIT i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=WEB-é-KIT i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=B-é-k i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-k i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=B-é-k i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-k i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-k i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=Web-é-Kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-Kit i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=b-é-K i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-é-K i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=Web-é-kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=Web-é-kit i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=B-é-K i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple*=B-é-K i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple*=web-É-kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-kit i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=b-É-K i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-K i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=web-É-Kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=web-É-Kit i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple*=b-É-k i]&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple*=b-É-k i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsattributecontainsvaluematchingisasciicaseinsensitivehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html (0 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html                                (rev 0)
+++ trunk/LayoutTests/fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style&gt;
+#test-root * {
+    background-color: red;
+}
+&lt;/style&gt;
+&lt;style id=&quot;style&quot;&gt;
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div style=&quot;display:none&quot; id=&quot;test-root&quot;&gt;
+        &lt;div data-attribute=&quot;Web-É-Kit&quot; multiple=&quot;WEB-é-KIT&quot; id=&quot;target1&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;web-É-kit&quot; multiple=&quot;Web-é-Kit&quot; id=&quot;target2&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;WEB-É-KIT&quot; multiple=&quot;Web-é-kit&quot; id=&quot;target3&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;Web-é-Kit&quot; multiple=&quot;web-É-kit&quot; id=&quot;target4&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;web-é-kit&quot; multiple=&quot;web-É-Kit&quot; id=&quot;target5&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/body&gt;
+&lt;script&gt;
+description('When matching attributes case insensitively, it should be ASCII case insensitive. This test verifies the behavior when matching substring anywhere in the values (e.g. [a*=&quot;b&quot;])');
+
+function testQuerySelector(selector, expectedIds) {
+    shouldBe(&quot;document.querySelectorAll('&quot; + selector + &quot;').length&quot;, '' + expectedIds.length);
+    for (var i = 0; i &lt; expectedIds.length; ++i)
+        shouldBeEqualToString(&quot;document.querySelectorAll('&quot; + selector + &quot;')[&quot; + i + &quot;].id&quot;, 'target' + expectedIds[i]);
+}
+
+function testStyling(selector, expectedIds) {
+    var stylingElement = document.getElementById(&quot;style&quot;);
+    stylingElement.innerHTML = '' + selector + ' { background-color: rgb(10, 100, 200); }';
+
+    var allTestCases = document.querySelectorAll(&quot;#test-root *&quot;);
+    for (var i = 0; i &lt; allTestCases.length; ++i) {
+        var expectMatch = expectedIds.indexOf(parseInt(allTestCases[i].id.replace('target', ''))) &gt;= 0;
+        shouldBeEqualToString('getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[' + i + ']).backgroundColor', expectMatch ? 'rgb(10, 100, 200)' : 'rgb(255, 0, 0)');
+    }
+
+    stylingElement.innerHTML = '';
+}
+
+function testSelector(selector, expectedIds) {
+    debug(&quot;Testing \&quot;&quot; + selector + &quot;\&quot;&quot;);
+    testQuerySelector(&quot;#test-root &quot; + selector, expectedIds);
+    testStyling(&quot;#test-root &quot; + selector, expectedIds);
+    debug(&quot;&quot;);
+}
+
+var testCases = [
+    // Regular attribute matching is case sensitive.
+    ['[data-attribute*=Web-É-Kit]', [1]],
+    ['[data-attribute*=b-É-K]', [1]],
+
+    ['[data-attribute*=web-É-kit]', [2]],
+    ['[data-attribute*=b-É-k]', [2]],
+
+    ['[data-attribute*=WEB-É-KIT]', [3]],
+    ['[data-attribute*=B-É-K]', [3]],
+
+    ['[data-attribute*=Web-é-Kit]', [4]],
+    ['[data-attribute*=b-é-K]', [4]],
+
+    ['[data-attribute*=web-é-kit]', [5]],
+    ['[data-attribute*=b-é-k]', [5]],
+
+    // Same selectors with the case-insensitive flag.
+    ['[data-attribute*=Web-É-Kit i]', [1, 2, 3]],
+    ['[data-attribute*=b-É-k i]', [1, 2, 3]],
+
+    ['[data-attribute*=web-É-kit i]', [1, 2, 3]],
+    ['[data-attribute*=b-É-k i]', [1, 2, 3]],
+
+    ['[data-attribute*=WEB-É-KIT i]', [1, 2, 3]],
+    ['[data-attribute*=B-É-K i]', [1, 2, 3]],
+
+    ['[data-attribute*=Web-é-Kit i]', [4, 5]],
+    ['[data-attribute*=b-é-k i]', [4, 5]],
+
+    ['[data-attribute*=web-é-kit i]', [4, 5]],
+    ['[data-attribute*=b-é-k i]', [4, 5]],
+
+    // &quot;multiple&quot; is one of those weird legacy exception: it is always case insensitive in HTML.
+    ['[multiple*=WEB-é-KIT]', [1, 2, 3]],
+    ['[multiple*=B-é-K]', [1, 2, 3]],
+
+    ['[multiple*=Web-é-Kit]', [1, 2, 3]],
+    ['[multiple*=b-é-k]', [1, 2, 3]],
+
+    ['[multiple*=Web-é-kit]', [1, 2, 3]],
+    ['[multiple*=b-é-K]', [1, 2, 3]],
+
+    ['[multiple*=web-É-kit]', [4, 5]],
+    ['[multiple*=b-É-K]', [4, 5]],
+
+    ['[multiple*=web-É-Kit]', [4, 5]],
+    ['[multiple*=b-É-k]', [4, 5]],
+
+    ['[multiple*=WEB-é-KIT i]', [1, 2, 3]],
+    ['[multiple*=B-é-k i]', [1, 2, 3]],
+
+    ['[multiple*=Web-é-Kit i]', [1, 2, 3]],
+    ['[multiple*=b-é-K i]', [1, 2, 3]],
+
+    ['[multiple*=Web-é-kit i]', [1, 2, 3]],
+    ['[multiple*=B-é-K i]', [1, 2, 3]],
+
+    ['[multiple*=web-É-kit i]', [4, 5]],
+    ['[multiple*=b-É-K i]', [4, 5]],
+
+    ['[multiple*=web-É-Kit i]', [4, 5]],
+    ['[multiple*=b-É-k i]', [4, 5]],
+];
+
+for (var testCase of testCases) {
+    testSelector(testCase[0], testCase[1]);
+}
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsattributelistvaluematchingisasciicaseinsensitiveexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt (0 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -0,0 +1,393 @@
</span><ins>+When matching attributes case insensitively, it should be ASCII case insensitive. This test verifies the behavior when matching a substring in a whitespace-separated list (e.g. [a~=&quot;b&quot;])
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Testing &quot;[data-attribute~=WÈb]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb]')[0].id is &quot;target1&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=Kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit]')[0].id is &quot;target1&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=wÈb]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb]')[0].id is &quot;target2&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=kit]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kit]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=kit]')[0].id is &quot;target2&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=WÈB]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB]')[0].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=KIT]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT]')[0].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=Wèb]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Wèb]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=Wèb]')[0].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=wèb]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wèb]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=wèb]')[0].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=kIt]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt]').length is 1
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt]')[0].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=WÈb i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈb i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=Kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit i]').length is 4
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Kit i]')[3].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=wÈb i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wÈb i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=kit i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kit i]').length is 4
+PASS document.querySelectorAll('#test-root [data-attribute~=kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kit i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kit i]')[3].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=WÈB i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB i]').length is 3
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=WÈB i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[data-attribute~=KIT i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT i]').length is 4
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=KIT i]')[3].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=Wèb i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Wèb i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute~=Wèb i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=Wèb i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=wèb i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wèb i]').length is 2
+PASS document.querySelectorAll('#test-root [data-attribute~=wèb i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=wèb i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[data-attribute~=kIt i]&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt i]').length is 4
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [data-attribute~=kIt i]')[3].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple~=WèB]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=WèB]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=KIT]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=KIT]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Wèb]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=Kit]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Wèb]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=kit]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=kit]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=wÈb]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]').length is 2
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple~=kiT]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=kiT]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=wÈb]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]').length is 2
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple~=WèB i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=WèB i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=WèB i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=KIT i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT i]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=KIT i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=KIT i]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Wèb i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit i]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=Kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Kit i]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=Wèb i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]').length is 3
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=Wèb i]')[2].id is &quot;target3&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=kit i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit i]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=kit i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kit i]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=wÈb i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+Testing &quot;[multiple~=kiT i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT i]').length is 4
+PASS document.querySelectorAll('#test-root [multiple~=kiT i]')[0].id is &quot;target1&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT i]')[1].id is &quot;target2&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT i]')[2].id is &quot;target3&quot;
+PASS document.querySelectorAll('#test-root [multiple~=kiT i]')[3].id is &quot;target4&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+
+Testing &quot;[multiple~=wÈb i]&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]').length is 2
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]')[0].id is &quot;target4&quot;
+PASS document.querySelectorAll('#test-root [multiple~=wÈb i]')[1].id is &quot;target5&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[0]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[1]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[2]).backgroundColor is &quot;rgb(255, 0, 0)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[3]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+PASS getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[4]).backgroundColor is &quot;rgb(10, 100, 200)&quot;
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastselectorsattributelistvaluematchingisasciicaseinsensitivehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html (0 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html                                (rev 0)
+++ trunk/LayoutTests/fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;meta charset=&quot;utf-8&quot;&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;style&gt;
+#test-root * {
+    background-color: red;
+}
+&lt;/style&gt;
+&lt;style id=&quot;style&quot;&gt;
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;div style=&quot;display:none&quot; id=&quot;test-root&quot;&gt;
+        &lt;div data-attribute=&quot;WÈb Kit&quot; multiple=&quot;padding WèB KIT&quot; id=&quot;target1&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;padding wÈb kit&quot; multiple=&quot;Kit Wèb&quot; id=&quot;target2&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;KIT WÈB&quot; multiple=&quot;Wèb kit&quot; id=&quot;target3&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;Wèb&quot; multiple=&quot;padding wÈb kiT&quot; id=&quot;target4&quot;&gt;&lt;/div&gt;
+        &lt;div data-attribute=&quot;padding wèb kIt&quot; multiple=&quot;wÈb&quot; id=&quot;target5&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/body&gt;
+&lt;script&gt;
+description('When matching attributes case insensitively, it should be ASCII case insensitive. This test verifies the behavior when matching a substring in a whitespace-separated list (e.g. [a~=&quot;b&quot;])');
+
+function testQuerySelector(selector, expectedIds) {
+    shouldBe(&quot;document.querySelectorAll('&quot; + selector + &quot;').length&quot;, '' + expectedIds.length);
+    for (var i = 0; i &lt; expectedIds.length; ++i)
+        shouldBeEqualToString(&quot;document.querySelectorAll('&quot; + selector + &quot;')[&quot; + i + &quot;].id&quot;, 'target' + expectedIds[i]);
+}
+
+function testStyling(selector, expectedIds) {
+    var stylingElement = document.getElementById(&quot;style&quot;);
+    stylingElement.innerHTML = '' + selector + ' { background-color: rgb(10, 100, 200); }';
+
+    var allTestCases = document.querySelectorAll(&quot;#test-root *&quot;);
+    for (var i = 0; i &lt; allTestCases.length; ++i) {
+        var expectMatch = expectedIds.indexOf(parseInt(allTestCases[i].id.replace('target', ''))) &gt;= 0;
+        shouldBeEqualToString('getComputedStyle(document.querySelectorAll(&quot;#test-root *&quot;)[' + i + ']).backgroundColor', expectMatch ? 'rgb(10, 100, 200)' : 'rgb(255, 0, 0)');
+    }
+
+    stylingElement.innerHTML = '';
+}
+
+function testSelector(selector, expectedIds) {
+    debug(&quot;Testing \&quot;&quot; + selector + &quot;\&quot;&quot;);
+    testQuerySelector(&quot;#test-root &quot; + selector, expectedIds);
+    testStyling(&quot;#test-root &quot; + selector, expectedIds);
+    debug(&quot;&quot;);
+}
+
+var testCases = [
+    // Regular attribute matching is case sensitive.
+    ['[data-attribute~=WÈb]', [1]],
+    ['[data-attribute~=Kit]', [1]],
+
+    ['[data-attribute~=wÈb]', [2]],
+    ['[data-attribute~=kit]', [2]],
+
+    ['[data-attribute~=WÈB]', [3]],
+    ['[data-attribute~=KIT]', [3]],
+
+    ['[data-attribute~=Wèb]', [4]],
+
+    ['[data-attribute~=wèb]', [5]],
+    ['[data-attribute~=kIt]', [5]],
+
+    // Same selectors with the case-insensitive flag.
+    ['[data-attribute~=WÈb i]', [1, 2, 3]],
+    ['[data-attribute~=Kit i]', [1, 2, 3, 5]],
+
+    ['[data-attribute~=wÈb i]', [1, 2, 3]],
+    ['[data-attribute~=kit i]', [1, 2, 3, 5]],
+
+    ['[data-attribute~=WÈB i]', [1, 2, 3]],
+    ['[data-attribute~=KIT i]', [1, 2, 3, 5]],
+
+    ['[data-attribute~=Wèb i]', [4, 5]],
+
+    ['[data-attribute~=wèb i]', [4, 5]],
+    ['[data-attribute~=kIt i]', [1, 2, 3, 5]],
+
+    // &quot;multiple&quot; is one of those weird legacy exception: it is always case insensitive in HTML.
+    ['[multiple~=WèB]', [1, 2, 3]],
+    ['[multiple~=KIT]', [1, 2, 3, 4]],
+
+    ['[multiple~=Wèb]', [1, 2, 3]],
+    ['[multiple~=Kit]', [1, 2, 3, 4]],
+
+    ['[multiple~=Wèb]', [1, 2, 3]],
+    ['[multiple~=kit]', [1, 2, 3, 4]],
+
+    ['[multiple~=wÈb]', [4, 5]],
+    ['[multiple~=kiT]', [1, 2, 3, 4]],
+
+    ['[multiple~=wÈb]', [4, 5]],
+
+    ['[multiple~=WèB i]', [1, 2, 3]],
+    ['[multiple~=KIT i]', [1, 2, 3, 4]],
+
+    ['[multiple~=Wèb i]', [1, 2, 3]],
+    ['[multiple~=Kit i]', [1, 2, 3, 4]],
+
+    ['[multiple~=Wèb i]', [1, 2, 3]],
+    ['[multiple~=kit i]', [1, 2, 3, 4]],
+
+    ['[multiple~=wÈb i]', [4, 5]],
+    ['[multiple~=kiT i]', [1, 2, 3, 4]],
+
+    ['[multiple~=wÈb i]', [4, 5]],
+];
+
+for (var testCase of testCases) {
+    testSelector(testCase[0], testCase[1]);
+}
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/ChangeLog        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-03-22  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        CSS Selectors: fix attribute case-insensitive matching of Contain and List
+        https://bugs.webkit.org/show_bug.cgi?id=142932
+
+        Reviewed by Darin Adler.
+
+        Add some utility functions to the string classes to find substrings
+        using ASCII case-insensitive comparisons.
+
+        * wtf/text/AtomicString.h:
+        (WTF::AtomicString::contains):
+        Add the light version that only lock one register.
+
+        (WTF::AtomicString::containsIgnoringASCIICase):
+        (WTF::AtomicString::findIgnoringASCIICase):
+
+        * wtf/text/StringCommon.h:
+        (WTF::findIgnoringASCIICase):
+        This is the common implementation used by StringView and StringImpl.
+
+        * wtf/text/StringImpl.cpp:
+        (WTF::StringImpl::findIgnoringASCIICase):
+        * wtf/text/StringImpl.h:
+        * wtf/text/StringView.cpp:
+        (WTF::StringView::containsIgnoringASCIICase):
+        (WTF::StringView::findIgnoringASCIICase):
+        * wtf/text/StringView.h:
+        * wtf/text/WTFString.h:
+        (WTF::String::findIgnoringASCIICase):
+        (WTF::String::contains):
+        (WTF::String::containsIgnoringASCIICase):
+
</ins><span class="cx"> 2015-03-19  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DFGAllocator should use bmalloc's aligned allocator.
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.h (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.h        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/AtomicString.h        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -115,14 +115,22 @@
</span><span class="cx">     bool contains(UChar c) const { return m_string.contains(c); }
</span><span class="cx">     bool contains(const LChar* s, bool caseSensitive = true) const
</span><span class="cx">         { return m_string.contains(s, caseSensitive); }
</span><del>-    bool contains(const String&amp; s, bool caseSensitive = true) const
</del><ins>+    bool contains(const String&amp; s) const
+        { return m_string.contains(s); }
+    bool contains(const String&amp; s, bool caseSensitive) const
</ins><span class="cx">         { return m_string.contains(s, caseSensitive); }
</span><ins>+    bool containsIgnoringASCIICase(const String&amp; s) const
+        { return m_string.containsIgnoringASCIICase(s); }
</ins><span class="cx"> 
</span><span class="cx">     size_t find(UChar c, unsigned start = 0) const { return m_string.find(c, start); }
</span><span class="cx">     size_t find(const LChar* s, unsigned start = 0, bool caseSentitive = true) const
</span><span class="cx">         { return m_string.find(s, start, caseSentitive); }
</span><span class="cx">     size_t find(const String&amp; s, unsigned start = 0, bool caseSentitive = true) const
</span><span class="cx">         { return m_string.find(s, start, caseSentitive); }
</span><ins>+    size_t findIgnoringASCIICase(const String&amp; s) const
+        { return m_string.findIgnoringASCIICase(s); }
+    size_t findIgnoringASCIICase(const String&amp; s, unsigned startOffset) const
+        { return m_string.findIgnoringASCIICase(s, startOffset); }
</ins><span class="cx">     size_t find(CharacterMatchFunctionPtr matchFunction, unsigned start = 0) const
</span><span class="cx">         { return m_string.find(matchFunction, start); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringCommonh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringCommon.h (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringCommon.h        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/StringCommon.h        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -417,6 +417,50 @@
</span><span class="cx">     return equalIgnoringASCIICase(reference.characters16() + startOffset, suffix.characters16(), suffixLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template &lt;typename SearchCharacterType, typename MatchCharacterType&gt;
+size_t findIgnoringASCIICase(const SearchCharacterType* source, const MatchCharacterType* matchCharacters, unsigned startOffset, unsigned searchLength, unsigned matchLength)
+{
+    ASSERT(searchLength &gt;= matchLength);
+
+    const SearchCharacterType* startSearchedCharacters = source + startOffset;
+
+    // delta is the number of additional times to test; delta == 0 means test only once.
+    unsigned delta = searchLength - matchLength;
+
+    for (unsigned i = 0; i &lt;= delta; ++i) {
+        if (equalIgnoringASCIICase(startSearchedCharacters + i, matchCharacters, matchLength))
+            return startOffset + i;
+    }
+    return notFound;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template&lt;typename StringClassA, typename StringClassB&gt;
+size_t findIgnoringASCIICase(const StringClassA&amp; source, const StringClassB&amp; stringToFind, unsigned startOffset)
+{
+    unsigned sourceStringLength = source.length();
+    unsigned matchLength = stringToFind.length();
+    if (!matchLength)
+        return std::min(startOffset, sourceStringLength);
+
+    // Check startOffset &amp; matchLength are in range.
+    if (startOffset &gt; sourceStringLength)
+        return notFound;
+    unsigned searchLength = sourceStringLength - startOffset;
+    if (matchLength &gt; searchLength)
+        return notFound;
+
+    if (source.is8Bit()) {
+        if (stringToFind.is8Bit())
+            return findIgnoringASCIICase(source.characters8(), stringToFind.characters8(), startOffset, searchLength, matchLength);
+        return findIgnoringASCIICase(source.characters8(), stringToFind.characters16(), startOffset, searchLength, matchLength);
+    }
+
+    if (stringToFind.is8Bit())
+        return findIgnoringASCIICase(source.characters16(), stringToFind.characters8(), startOffset, searchLength, matchLength);
+
+    return findIgnoringASCIICase(source.characters16(), stringToFind.characters16(), startOffset, searchLength, matchLength);
+}
+
+}
+
</ins><span class="cx"> #endif // StringCommon_h
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringImpl.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringImpl.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/StringImpl.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -1226,6 +1226,30 @@
</span><span class="cx">     return findIgnoringCaseInner(characters16() + index, matchString-&gt;characters16(), index, searchLength, matchLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+size_t StringImpl::findIgnoringASCIICase(const StringImpl&amp; matchString) const
+{
+    return ::WTF::findIgnoringASCIICase(*this, matchString, 0);
+}
+
+size_t StringImpl::findIgnoringASCIICase(const StringImpl&amp; matchString, unsigned startOffset) const
+{
+    return ::WTF::findIgnoringASCIICase(*this, matchString, startOffset);
+}
+
+size_t StringImpl::findIgnoringASCIICase(const StringImpl* matchString) const
+{
+    if (!matchString)
+        return notFound;
+    return ::WTF::findIgnoringASCIICase(*this, *matchString, 0);
+}
+
+size_t StringImpl::findIgnoringASCIICase(const StringImpl* matchString, unsigned startOffset) const
+{
+    if (!matchString)
+        return notFound;
+    return ::WTF::findIgnoringASCIICase(*this, *matchString, startOffset);
+}
+
</ins><span class="cx"> size_t StringImpl::findNextLineStart(unsigned index)
</span><span class="cx"> {
</span><span class="cx">     if (is8Bit())
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringImpl.h (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringImpl.h        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/StringImpl.h        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -661,6 +661,10 @@
</span><span class="cx">     size_t findIgnoringCase(const LChar*, unsigned index = 0);
</span><span class="cx">     ALWAYS_INLINE size_t findIgnoringCase(const char* s, unsigned index = 0) { return findIgnoringCase(reinterpret_cast&lt;const LChar*&gt;(s), index); }
</span><span class="cx">     WTF_EXPORT_STRING_API size_t findIgnoringCase(StringImpl*, unsigned index = 0);
</span><ins>+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl&amp;) const;
+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl&amp;, unsigned startOffset) const;
+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl*) const;
+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringImpl*, unsigned startOffset) const;
</ins><span class="cx"> 
</span><span class="cx">     WTF_EXPORT_STRING_API size_t findNextLineStart(unsigned index = UINT_MAX);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringView.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringView.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/StringView.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -33,6 +33,26 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><ins>+bool StringView::containsIgnoringASCIICase(const StringView&amp; matchString) const
+{
+    return findIgnoringASCIICase(matchString) != notFound;
+}
+
+bool StringView::containsIgnoringASCIICase(const StringView&amp; matchString, unsigned startOffset) const
+{
+    return findIgnoringASCIICase(matchString, startOffset) != notFound;
+}
+
+size_t StringView::findIgnoringASCIICase(const StringView&amp; matchString) const
+{
+    return ::WTF::findIgnoringASCIICase(*this, matchString, 0);
+}
+
+size_t StringView::findIgnoringASCIICase(const StringView&amp; matchString, unsigned startOffset) const
+{
+    return ::WTF::findIgnoringASCIICase(*this, matchString, startOffset);
+}
+
</ins><span class="cx"> bool StringView::startsWith(const StringView&amp; prefix) const
</span><span class="cx"> {
</span><span class="cx">     return ::WTF::startsWith(*this, prefix);
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringView.h (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringView.h        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/StringView.h        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -104,7 +104,12 @@
</span><span class="cx">     StringView substring(unsigned start, unsigned length = std::numeric_limits&lt;unsigned&gt;::max()) const;
</span><span class="cx"> 
</span><span class="cx">     size_t find(UChar, unsigned start = 0) const;
</span><ins>+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringView&amp;) const;
+    WTF_EXPORT_STRING_API size_t findIgnoringASCIICase(const StringView&amp;, unsigned startOffset) const;
+
</ins><span class="cx">     bool contains(UChar) const;
</span><ins>+    WTF_EXPORT_STRING_API bool containsIgnoringASCIICase(const StringView&amp;) const;
+    WTF_EXPORT_STRING_API bool containsIgnoringASCIICase(const StringView&amp;, unsigned startOffset) const;
</ins><span class="cx"> 
</span><span class="cx">     WTF_EXPORT_STRING_API bool startsWith(const StringView&amp;) const;
</span><span class="cx">     WTF_EXPORT_STRING_API bool startsWithIgnoringASCIICase(const StringView&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWTFwtftextWTFStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/WTFString.h (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/WTFString.h        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WTF/wtf/text/WTFString.h        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -220,6 +220,10 @@
</span><span class="cx">         { return m_impl ? m_impl-&gt;find(str.impl()) : notFound; }
</span><span class="cx">     size_t find(const String&amp; str, unsigned start) const
</span><span class="cx">         { return m_impl ? m_impl-&gt;find(str.impl(), start) : notFound; }
</span><ins>+    size_t findIgnoringASCIICase(const String&amp; str) const
+        { return m_impl ? m_impl-&gt;findIgnoringASCIICase(str.impl()) : notFound; }
+    size_t findIgnoringASCIICase(const String&amp; str, unsigned startOffset) const
+        { return m_impl ? m_impl-&gt;findIgnoringASCIICase(str.impl(), startOffset) : notFound; }
</ins><span class="cx"> 
</span><span class="cx">     size_t find(CharacterMatchFunctionPtr matchFunction, unsigned start = 0) const
</span><span class="cx">         { return m_impl ? m_impl-&gt;find(matchFunction, start) : notFound; }
</span><span class="lines">@@ -258,8 +262,14 @@
</span><span class="cx">     bool contains(UChar c) const { return find(c) != notFound; }
</span><span class="cx">     bool contains(const LChar* str, bool caseSensitive = true, unsigned startOffset = 0) const 
</span><span class="cx">         { return find(str, startOffset, caseSensitive) != notFound; }
</span><del>-    bool contains(const String&amp; str, bool caseSensitive = true, unsigned startOffset = 0) const 
</del><ins>+    bool contains(const String&amp; str) const
+        { return find(str) != notFound; }
+    bool contains(const String&amp; str, bool caseSensitive, unsigned startOffset = 0) const
</ins><span class="cx">         { return find(str, startOffset, caseSensitive) != notFound; }
</span><ins>+    bool containsIgnoringASCIICase(const String&amp; str) const
+        { return findIgnoringASCIICase(str) != notFound; }
+    bool containsIgnoringASCIICase(const String&amp; str, unsigned startOffset) const
+        { return findIgnoringASCIICase(str, startOffset) != notFound; }
</ins><span class="cx"> 
</span><span class="cx">     bool startsWith(const String&amp; s) const
</span><span class="cx">         { return m_impl ? m_impl-&gt;startsWith(s.impl()) : s.isEmpty(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WebCore/ChangeLog        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-03-22  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        CSS Selectors: fix attribute case-insensitive matching of Contain and List
+        https://bugs.webkit.org/show_bug.cgi?id=142932
+
+        Reviewed by Darin Adler.
+
+        Fix the last two attribute selectors that were using full case-insensitive
+        match:
+            -Contain ([foo*=bar]).
+            -List (foo~=bar]).
+
+        Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
+               fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
+
+        * css/SelectorChecker.cpp:
+        (WebCore::attributeValueMatches):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::attributeValueContains):
+        (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
+
</ins><span class="cx"> 2015-03-22  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Detect when url filter pattern with groups match the empty string
</span></span></pre></div>
<a id="trunkSourceWebCorecssSelectorCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/SelectorChecker.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/SelectorChecker.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WebCore/css/SelectorChecker.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -431,7 +431,11 @@
</span><span class="cx"> 
</span><span class="cx">             unsigned startSearchAt = 0;
</span><span class="cx">             while (true) {
</span><del>-                size_t foundPos = value.find(selectorValue, startSearchAt, caseSensitive);
</del><ins>+                size_t foundPos;
+                if (caseSensitive)
+                    foundPos = value.find(selectorValue, startSearchAt);
+                else
+                    foundPos = value.findIgnoringASCIICase(selectorValue, startSearchAt);
</ins><span class="cx">                 if (foundPos == notFound)
</span><span class="cx">                     return false;
</span><span class="cx">                 if (!foundPos || isHTMLSpace(value[foundPos - 1])) {
</span><span class="lines">@@ -445,10 +449,18 @@
</span><span class="cx">             }
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-    case CSSSelector::Contain:
-        if (!value.contains(selectorValue, caseSensitive) || selectorValue.isEmpty())
</del><ins>+    case CSSSelector::Contain: {
+        bool valueContainsSelectorValue;
+        if (caseSensitive)
+            valueContainsSelectorValue = value.contains(selectorValue);
+        else
+            valueContainsSelectorValue = value.containsIgnoringASCIICase(selectorValue);
+
+        if (!valueContainsSelectorValue || selectorValue.isEmpty())
</ins><span class="cx">             return false;
</span><ins>+
</ins><span class="cx">         break;
</span><ins>+    }
</ins><span class="cx">     case CSSSelector::Begin:
</span><span class="cx">         if (selectorValue.isEmpty())
</span><span class="cx">             return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecssjitSelectorCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -2817,7 +2817,7 @@
</span><span class="cx">     AtomicStringImpl&amp; valueImpl = *attribute-&gt;value().impl();
</span><span class="cx">     if (caseSensitivity == CaseSensitive)
</span><span class="cx">         return valueImpl.find(expectedString) != notFound;
</span><del>-    return valueImpl.findIgnoringCase(expectedString) != notFound;
</del><ins>+    return valueImpl.findIgnoringASCIICase(expectedString) != notFound;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;CaseSensitivity caseSensitivity&gt;
</span><span class="lines">@@ -2863,7 +2863,7 @@
</span><span class="cx">         if (caseSensitivity == CaseSensitive)
</span><span class="cx">             foundPos = value.find(expectedString, startSearchAt);
</span><span class="cx">         else
</span><del>-            foundPos = value.findIgnoringCase(expectedString, startSearchAt);
</del><ins>+            foundPos = value.findIgnoringASCIICase(expectedString, startSearchAt);
</ins><span class="cx">         if (foundPos == notFound)
</span><span class="cx">             return false;
</span><span class="cx">         if (!foundPos || isHTMLSpace(value[foundPos - 1])) {
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Tools/ChangeLog        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-03-22  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        CSS Selectors: fix attribute case-insensitive matching of Contain and List
+        https://bugs.webkit.org/show_bug.cgi?id=142932
+
+        Reviewed by Darin Adler.
+
+        Add tests for the new features and fix some existing tests using the 
+        stringFromUTF8() utility recently added by Dhi.
+
+        * TestWebKitAPI/Tests/WTF/StringImpl.cpp:
+        (TestWebKitAPI::stringFromUTF8):
+        * TestWebKitAPI/Tests/WTF/StringView.cpp:
+
</ins><span class="cx"> 2015-03-22  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] install-dependencies should install orc
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFStringImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -142,12 +142,17 @@
</span><span class="cx">     ASSERT_TRUE(equalIgnoringASCIICase(b.get(), a.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static RefPtr&lt;StringImpl&gt; stringFromUTF8(const char* characters)
+{
+    return String::fromUTF8(characters).impl();
+}
+
</ins><span class="cx"> TEST(WTF, StringImplEqualIgnoringASCIICaseWithLatin1Characters)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;StringImpl&gt; a = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcéeFG&quot;));
-    RefPtr&lt;StringImpl&gt; b = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;ABCÉEFG&quot;));
-    RefPtr&lt;StringImpl&gt; c = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;ABCéEFG&quot;));
-    RefPtr&lt;StringImpl&gt; d = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;abcéefg&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; a = stringFromUTF8(&quot;aBcéeFG&quot;);
+    RefPtr&lt;StringImpl&gt; b = stringFromUTF8(&quot;ABCÉEFG&quot;);
+    RefPtr&lt;StringImpl&gt; c = stringFromUTF8(&quot;ABCéEFG&quot;);
+    RefPtr&lt;StringImpl&gt; d = stringFromUTF8(&quot;abcéefg&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // Identity.
</span><span class="cx">     ASSERT_TRUE(equalIgnoringASCIICase(a.get(), a.get()));
</span><span class="lines">@@ -164,10 +169,174 @@
</span><span class="cx">     ASSERT_TRUE(equalIgnoringASCIICase(c.get(), d.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TEST(WTF, StringImplFindIgnoringASCIICaseBasic)
+{
+    RefPtr&lt;StringImpl&gt; referenceA = stringFromUTF8(&quot;aBcéeFG&quot;);
+    RefPtr&lt;StringImpl&gt; referenceB = stringFromUTF8(&quot;ABCÉEFG&quot;);
+
+    // Search the exact string.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA-&gt;findIgnoringASCIICase(referenceA.get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB-&gt;findIgnoringASCIICase(referenceB.get()));
+
+    // A and B are distinct by the non-ascii character é/É.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(notFound), referenceA-&gt;findIgnoringASCIICase(referenceB.get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(notFound), referenceB-&gt;findIgnoringASCIICase(referenceA.get()));
+
+    // Find the prefix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;a&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;abcé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;A&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;a&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;abcÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;A&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get()));
+
+    // Not a prefix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;x&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;accé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;abcÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;X&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABDé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;y&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;accÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;abcé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;Y&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABdÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCé&quot;).get()));
+
+    // Find the infix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;c&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;é&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Cée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éE&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Cé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;C&quot;).get()));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cÉe&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Ée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;c&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;É&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;CÉe&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ÉE&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;CÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;C&quot;).get()));
+
+    // Not an infix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;céd&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Ée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;bé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;x&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;É&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;CÉe&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éd&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;CÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Y&quot;).get()));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cée&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Éc&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;cé&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;W&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;é&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;bÉe&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éE&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;BÉ&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;z&quot;).get()));
+
+    // Find the suffix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;g&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;efg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éefg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;G&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;EFG&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éEFG&quot;).get()));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;g&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;efg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Éefg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;G&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;EFG&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ÉEFG&quot;).get()));
+
+    // Not a suffix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;X&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;edg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;Éefg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;w&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;dFG&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ÉEFG&quot;).get()));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;Z&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ffg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éefg&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(StringImpl::createFromLiteral(&quot;r&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;EgG&quot;).get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;éEFG&quot;).get()));
+}
+
+TEST(WTF, StringImplFindIgnoringASCIICaseWithValidOffset)
+{
+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;ABCÉEFGaBcéeFG&quot;);
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABC&quot;).get(), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABC&quot;).get(), 1));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get(), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get(), 1));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCé&quot;).get(), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCé&quot;).get(), 1));
+}
+
+TEST(WTF, StringImplFindIgnoringASCIICaseWithInvalidOffset)
+{
+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;ABCÉEFGaBcéeFG&quot;);
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABC&quot;).get(), 15));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABC&quot;).get(), 16));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get(), 17));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get(), 42));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(stringFromUTF8(&quot;ABCÉ&quot;).get(), std::numeric_limits&lt;unsigned&gt;::max()));
+}
+
+TEST(WTF, StringImplFindIgnoringASCIICaseOnNull)
+{
+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;ABCÉEFG&quot;);
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, 3));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, 7));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, 8));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, 42));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(nullptr, std::numeric_limits&lt;unsigned&gt;::max()));
+}
+
+TEST(WTF, StringImplFindIgnoringASCIICaseOnEmpty)
+{
+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;ABCÉEFG&quot;);
+    RefPtr&lt;StringImpl&gt; empty = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;&quot;));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference-&gt;findIgnoringASCIICase(empty.get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference-&gt;findIgnoringASCIICase(empty.get(), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), reference-&gt;findIgnoringASCIICase(empty.get(), 3));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(empty.get(), 7));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(empty.get(), 8));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(empty.get(), 42));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference-&gt;findIgnoringASCIICase(empty.get(), std::numeric_limits&lt;unsigned&gt;::max()));
+}
+
+TEST(WTF, StringImplFindIgnoringASCIICaseWithPatternLongerThanReference)
+{
+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;ABCÉEFG&quot;);
+    RefPtr&lt;StringImpl&gt; pattern = stringFromUTF8(&quot;XABCÉEFG&quot;);
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference-&gt;findIgnoringASCIICase(pattern.get()));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(1), pattern-&gt;findIgnoringASCIICase(reference.get()));
+}
+
</ins><span class="cx"> TEST(WTF, StringImplStartsWithIgnoringASCIICaseBasic)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;StringImpl&gt; reference = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcéX&quot;));
-    RefPtr&lt;StringImpl&gt; referenceEquivalent = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;AbCéx&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;aBcéX&quot;);
+    RefPtr&lt;StringImpl&gt; referenceEquivalent = stringFromUTF8(&quot;AbCéx&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // Identity.
</span><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(reference.get()));
</span><span class="lines">@@ -194,23 +363,23 @@
</span><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(abcUpper.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(*abcUpper.get()));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StringImpl&gt; abcAccentLower = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;abcé&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; abcAccentLower = stringFromUTF8(&quot;abcé&quot;);
</ins><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(abcAccentLower.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(*abcAccentLower.get()));
</span><del>-    RefPtr&lt;StringImpl&gt; abcAccentUpper = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;ABCé&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; abcAccentUpper = stringFromUTF8(&quot;ABCé&quot;);
</ins><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(abcAccentUpper.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;startsWithIgnoringASCIICase(*abcAccentUpper.get()));
</span><span class="cx"> 
</span><span class="cx">     // Negative cases.
</span><del>-    RefPtr&lt;StringImpl&gt; differentFirstChar = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;bBcéX&quot;));
-    RefPtr&lt;StringImpl&gt; differentFirstCharProperPrefix = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;CBcé&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; differentFirstChar = stringFromUTF8(&quot;bBcéX&quot;);
+    RefPtr&lt;StringImpl&gt; differentFirstCharProperPrefix = stringFromUTF8(&quot;CBcé&quot;);
</ins><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(differentFirstChar.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(*differentFirstChar.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(differentFirstCharProperPrefix.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(*differentFirstCharProperPrefix.get()));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StringImpl&gt; uppercaseAccent = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcÉX&quot;));
-    RefPtr&lt;StringImpl&gt; uppercaseAccentProperPrefix = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcÉX&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; uppercaseAccent = stringFromUTF8(&quot;aBcÉX&quot;);
+    RefPtr&lt;StringImpl&gt; uppercaseAccentProperPrefix = stringFromUTF8(&quot;aBcÉX&quot;);
</ins><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(uppercaseAccent.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(*uppercaseAccent.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;startsWithIgnoringASCIICase(uppercaseAccentProperPrefix.get()));
</span><span class="lines">@@ -240,8 +409,8 @@
</span><span class="cx"> 
</span><span class="cx"> TEST(WTF, StringImplEndsWithIgnoringASCIICaseBasic)
</span><span class="cx"> {
</span><del>-    RefPtr&lt;StringImpl&gt; reference = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;XÉCbA&quot;));
-    RefPtr&lt;StringImpl&gt; referenceEquivalent = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;xÉcBa&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; reference = stringFromUTF8(&quot;XÉCbA&quot;);
+    RefPtr&lt;StringImpl&gt; referenceEquivalent = stringFromUTF8(&quot;xÉcBa&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // Identity.
</span><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(reference.get()));
</span><span class="lines">@@ -268,23 +437,23 @@
</span><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(abcUpper.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(*abcUpper.get()));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StringImpl&gt; abcAccentLower = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;Écba&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; abcAccentLower = stringFromUTF8(&quot;Écba&quot;);
</ins><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(abcAccentLower.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(*abcAccentLower.get()));
</span><del>-    RefPtr&lt;StringImpl&gt; abcAccentUpper = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;ÉCBA&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; abcAccentUpper = stringFromUTF8(&quot;ÉCBA&quot;);
</ins><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(abcAccentUpper.get()));
</span><span class="cx">     ASSERT_TRUE(reference-&gt;endsWithIgnoringASCIICase(*abcAccentUpper.get()));
</span><span class="cx"> 
</span><span class="cx">     // Negative cases.
</span><del>-    RefPtr&lt;StringImpl&gt; differentLastChar = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;XÉCbB&quot;));
-    RefPtr&lt;StringImpl&gt; differentLastCharProperSuffix = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;ÉCbb&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; differentLastChar = stringFromUTF8(&quot;XÉCbB&quot;);
+    RefPtr&lt;StringImpl&gt; differentLastCharProperSuffix = stringFromUTF8(&quot;ÉCbb&quot;);
</ins><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(differentLastChar.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(*differentLastChar.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(differentLastCharProperSuffix.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(*differentLastCharProperSuffix.get()));
</span><span class="cx"> 
</span><del>-    RefPtr&lt;StringImpl&gt; lowercaseAccent = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcéX&quot;));
-    RefPtr&lt;StringImpl&gt; loweraseAccentProperSuffix = StringImpl::create(reinterpret_cast&lt;const LChar*&gt;(&quot;aBcéX&quot;));
</del><ins>+    RefPtr&lt;StringImpl&gt; lowercaseAccent = stringFromUTF8(&quot;aBcéX&quot;);
+    RefPtr&lt;StringImpl&gt; loweraseAccentProperSuffix = stringFromUTF8(&quot;aBcéX&quot;);
</ins><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(lowercaseAccent.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(*lowercaseAccent.get()));
</span><span class="cx">     ASSERT_FALSE(reference-&gt;endsWithIgnoringASCIICase(loweraseAccentProperSuffix.get()));
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFStringViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp (181844 => 181845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp        2015-03-23 05:02:29 UTC (rev 181844)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp        2015-03-23 05:04:46 UTC (rev 181845)
</span><span class="lines">@@ -226,6 +226,171 @@
</span><span class="cx">     return ref;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+TEST(WTF, StringViewFindIgnoringASCIICaseBasic)
+{
+    String referenceAHolder;
+    StringView referenceA = stringViewFromUTF8(referenceAHolder, &quot;aBcéeFG&quot;);
+    String referenceBHolder;
+    StringView referenceB = stringViewFromUTF8(referenceBHolder, &quot;ABCÉEFG&quot;);
+
+    // Search the exact string.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA.findIgnoringASCIICase(referenceA));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB.findIgnoringASCIICase(referenceB));
+
+    // A and B are distinct by the non-ascii character é/É.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(notFound), referenceA.findIgnoringASCIICase(referenceB));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(notFound), referenceB.findIgnoringASCIICase(referenceA));
+
+    String tempStringHolder;
+    // Find the prefix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;a&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;abcé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;A&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;a&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;abcÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;A&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;)));
+
+    // Not a prefix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;x&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;accé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;abcÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;X&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABDé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;y&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;accÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;abcé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;Y&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABdÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCé&quot;)));
+
+    // Find the infix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;c&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;é&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Cée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éE&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Cé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;C&quot;)));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cÉe&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Ée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;c&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;É&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;CÉe&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ÉE&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;CÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(2), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;C&quot;)));
+
+    // Not an infix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;céd&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Ée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;bé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;x&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;É&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;CÉe&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éd&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;CÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Y&quot;)));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cée&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Éc&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;cé&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;W&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;é&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;bÉe&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éE&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;BÉ&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;z&quot;)));
+
+    // Find the suffix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;g&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;efg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éefg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;G&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;EFG&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éEFG&quot;)));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;g&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;efg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Éefg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(6), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;G&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(4), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;EFG&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ÉEFG&quot;)));
+
+    // Not a suffix.
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;X&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;edg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;Éefg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromLiteral(&quot;w&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;dFG&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceA.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ÉEFG&quot;)));
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;Z&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ffg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éefg&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromLiteral(&quot;r&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;EgG&quot;)));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), referenceB.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;éEFG&quot;)));
+}
+
+TEST(WTF, StringViewFindIgnoringASCIICaseWithValidOffset)
+{
+    String referenceHolder;
+    StringView reference = stringViewFromUTF8(referenceHolder, &quot;ABCÉEFGaBcéeFG&quot;);
+    String tempStringHolder;
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABC&quot;), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABC&quot;), 1));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;), 1));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCé&quot;), 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCé&quot;), 1));
+}
+
+TEST(WTF, StringViewFindIgnoringASCIICaseWithInvalidOffset)
+{
+    String referenceHolder;
+    StringView reference = stringViewFromUTF8(referenceHolder, &quot;ABCÉEFGaBcéeFG&quot;);
+    String tempStringHolder;
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABC&quot;), 15));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABC&quot;), 16));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;), 17));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;), 42));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(stringViewFromUTF8(tempStringHolder, &quot;ABCÉ&quot;), std::numeric_limits&lt;unsigned&gt;::max()));
+}
+
+TEST(WTF, StringViewFindIgnoringASCIICaseOnEmpty)
+{
+    String referenceHolder;
+    StringView reference = stringViewFromUTF8(referenceHolder, &quot;ABCÉEFG&quot;);
+    StringView empty = stringViewFromLiteral(&quot;&quot;);
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference.findIgnoringASCIICase(empty));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), reference.findIgnoringASCIICase(empty, 0));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(3), reference.findIgnoringASCIICase(empty, 3));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(empty, 7));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(empty, 8));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(empty, 42));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(7), reference.findIgnoringASCIICase(empty, std::numeric_limits&lt;unsigned&gt;::max()));
+}
+
+TEST(WTF, StringViewFindIgnoringASCIICaseWithPatternLongerThanReference)
+{
+    String referenceHolder;
+    StringView reference = stringViewFromUTF8(referenceHolder, &quot;ABCÉEFG&quot;);
+    String patternHolder;
+    StringView pattern = stringViewFromUTF8(referenceHolder, &quot;ABCÉEFGA&quot;);
+
+    EXPECT_EQ(static_cast&lt;size_t&gt;(WTF::notFound), reference.findIgnoringASCIICase(pattern));
+    EXPECT_EQ(static_cast&lt;size_t&gt;(0), pattern.findIgnoringASCIICase(reference));
+}
+
</ins><span class="cx"> TEST(WTF, StringViewStartsWithBasic)
</span><span class="cx"> {
</span><span class="cx">     StringView reference = stringViewFromLiteral(&quot;abcdefg&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>