Index: LayoutTests/fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml |
diff --git a/LayoutTests/fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml b/LayoutTests/fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml |
index a21f9f742b23bc710ed30978091f7c6edba291c3..8dca872a0d4eb20a3b5238c7b8f2121f02b435f8 100644 |
--- a/LayoutTests/fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml |
+++ b/LayoutTests/fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml |
@@ -37,7 +37,7 @@ |
html.nopass .pass { display: none; } |
]]></style> |
- <style type="text/test" id="test"> |
+ <style type="text/test" id="test"><![CDATA[ |
/* :target selector */ |
.target :target { background-color: lime; } |
@@ -192,8 +192,8 @@ |
.plus .t1, .plus .t2 { background-color: white; } |
.plus .t1 + .unitTest + .unitTest { background-color: lime; } |
.plus .t1:hover + .unitTest + .unitTest { background-color: red; } |
- </style> |
- <style type="text/test" id="error"> |
+ ]]></style> |
+ <style type="text/test" id="error"><![CDATA[ |
.blox16:not(.blox15[foo="blox14"]) { background-color: red; } |
/* Tests from http://www.w3.org/Style/CSS/Test/CSS3/Selectors/20060307/html/index.html */ |
@@ -222,7 +222,7 @@ |
..test { background: red; color: yellow; } |
.foo..quux { background: red; color: yellow; } |
.bar. { background: red; color: yellow; } |
- </style> |
+ ]]></style> |
<script><![CDATA[ |
if (window.testRunner) { |
testRunner.dumpAsText(); |
@@ -284,14 +284,14 @@ |
cacheCheck( "Fragment", fragment ); |
root.parentNode.removeChild( root ); |
- |
+ |
interfaceCheck(document, "Document"); |
runTest( css, "Document", document, true ); |
check( "Document", document, true, false ); |
runTest( ecss, "Syntax Error: Document", document, false ); |
jqTests("Document", document, "querySelectorAll"); |
cacheCheck( "Document", document ); |
- |
+ |
done(); |
function interfaceCheck(obj, type){ |
@@ -399,10 +399,10 @@ |
var test = css[i]; |
if ( test.length == 2 ) { |
var query = test[0], color = test[1].match(/: ([^\s;]+)/)[1]; |
- |
+ |
try { |
var found = root.querySelectorAll(query); |
- |
+ |
for ( var f = 0; f < found.length; f++ ) { |
found[f].style.backgroundColor = color; |
} |
@@ -510,13 +510,13 @@ |
} catch(e) { |
pass = typeof DOMException !== "undefined" && e.code == DOMException.SYNTAX_ERR; |
} |
- |
+ |
assert( pass, type + ": " + name + " (" + nq + ")" + |
(pass ? "" : " Expected: " + extra(ids) + " Received: " + extra(results)) ); |
function hasPassed(results, ids){ |
var pass = (results && results.length == ids.length) || (!results && !ids); |
- |
+ |
if ( ids && results ) { |
for ( var i = 0; ids && i < ids.length; i++ ) { |
if ( ids[i] !== results[i].getAttribute("id") ) { |
@@ -537,7 +537,7 @@ |
extra += (extra.length > 2 ? "," : "") + "'" + (results[i].id || results[i]) + "'"; |
} |
} |
- |
+ |
extra += "]"; |
return extra; |
} |
@@ -573,7 +573,7 @@ |
var param = query("#object1 param"); |
assert( param && param.length == 2, type + ": Object/param as context" ); |
- var l = query("#length"); |
+ var l = query("#length"); |
assert( l && l.length, type + ': <input name="length"> cannot be found under IE' ); |
var lin = query("#lengthtest input"); |
assert( lin && lin.length, type + ': <input name="length"> cannot be found under IE' ); |
@@ -596,18 +596,18 @@ |
t( "Multiple ID selectors using UTF8", "#台北Táiběi, #台北", ["台北Táiběi","台北"] ); |
t( "Descendant ID selector using UTF8", "div #台北", ["台北"] ); |
t( "Child ID selector using UTF8", "form > #台北", ["台北"] ); |
- |
+ |
t( "Escaped ID", "#foo\\:bar", ["foo:bar"] ); |
t( "Escaped ID", "#test\\.foo\\[5\\]bar", ["test.foo[5]bar"] ); |
t( "Descendant escaped ID", "div #foo\\:bar", ["foo:bar"] ); |
t( "Descendant escaped ID", "div #test\\.foo\\[5\\]bar", ["test.foo[5]bar"] ); |
t( "Child escaped ID", "form > #foo\\:bar", ["foo:bar"] ); |
t( "Child escaped ID", "form > #test\\.foo\\[5\\]bar", ["test.foo[5]bar"] ); |
- |
+ |
t( "ID Selector, child ID present", "#form > #radio1", ["radio1"] ); // bug #267 |
t( "ID Selector, not an ancestor ID", "#form #first", [] ); |
t( "ID Selector, not a child ID", "#form > #option1a", [] ); |
- |
+ |
t( "All Children of ID", "#foo > *", ["sndp", "en", "sap"] ); |
t( "All Children of ID with no children", "#firstUL > *", [] ); |
@@ -619,14 +619,14 @@ |
t( "Class Selector", ".blog.link", ["simon"] ); |
t( "Class Selector w/ Element", "a.blog", ["mark","simon"] ); |
t( "Parent Class Selector", "p .blog", ["mark","simon"] ); |
- |
+ |
t( "Class selector using UTF8", ".台北Táiběi", ["utf8class1"] ); |
t( "Class selector using UTF8", ".台北", ["utf8class1","utf8class2"] ); |
t( "Class selector using UTF8", ".台北Táiběi.台北", ["utf8class1"] ); |
t( "Class selector using UTF8", ".台北Táiběi, .台北", ["utf8class1","utf8class2"] ); |
t( "Descendant class selector using UTF8", "div .台北Táiběi", ["utf8class1"] ); |
t( "Child class selector using UTF8", "form > .台北Táiběi", ["utf8class1"] ); |
- |
+ |
t( "Escaped Class", ".foo\\:bar", ["foo:bar"] ); |
t( "Escaped Class", ".test\\.foo\\[5\\]bar", ["test.foo[5]bar"] ); |
t( "Descendant scaped Class", "div .foo\\:bar", ["foo:bar"] ); |
@@ -652,13 +652,13 @@ |
t( "Adjacent", "a+a", ["groups"] ); |
t( "Adjacent", "p + p", ["ap","en","sap"] ); |
t( "Comma, Child, and Adjacent", "a + a, code > a", ["groups","anchor1","anchor2"] ); |
- |
+ |
t( "First Child", "p:first-child", ["firstp","sndp"] ); |
t( "Nth Child", "p:nth-child(1)", ["firstp","sndp"] ); |
- |
+ |
t( "Last Child", "p:last-child", ["sap"] ); |
t( "Last Child", "a:last-child", ["simon1","anchor1","mark","yahoo","anchor2","simon"] ); |
- |
+ |
t( "Nth-child", "#main form#form > *:nth-child(2)", ["text2"] ); |
t( "Nth-child", "#main form#form > :nth-child(2)", ["text2"] ); |
@@ -684,27 +684,27 @@ |
t( "Attribute Exists", "a[title]", ["google"] ); |
t( "Attribute Exists", "*[title]", ["google"] ); |
t( "Attribute Exists", "[title]", ["google"] ); |
- |
+ |
t( "Attribute Equals", "a[rel='bookmark']", ["simon1"] ); |
t( "Attribute Equals", 'a[rel="bookmark"]', ["simon1"] ); |
t( "Attribute Equals", "a[rel=bookmark]", ["simon1"] ); |
t( "Multiple Attribute Equals", "#form input[type='hidden'],#form input[type='radio']", ['radio1','radio2','hidden1'] ); |
t( "Multiple Attribute Equals", "#form input[type=\"hidden\"],#form input[type='radio']", ['radio1','radio2','hidden1'] ); |
t( "Multiple Attribute Equals", "#form input[type=hidden],#form input[type=radio]", ['radio1','radio2','hidden1'] ); |
- |
+ |
t( "Attribute selector using UTF8", "span[lang=中文]", ["台北"] ); |
- |
+ |
t( "Attribute Begins With", "a[href ^= 'http://www']", ["google","yahoo"] ); |
t( "Attribute Ends With", "a[href $= 'org/']", ["mark"] ); |
t( "Attribute Contains", "a[href *= 'google']", ["google","groups"] ); |
- |
+ |
// t("Select options via [selected]", "#select1 option[selected]", ["option1a"] ); |
t("Select options via [selected]", "#select1 option[selected]", [] ); |
t("Select options via [selected]", "#select2 option[selected]", ["option2d"] ); |
t("Select options via [selected]", "#select3 option[selected]", ["option3b", "option3c"] ); |
- |
+ |
t( "Grouped Form Elements", "input[name='foo[bar]']", ["hidden2"] ); |
- |
+ |
t( ":not() Existing attribute", "#form select:not([multiple])", ["select1", "select2"]); |
t( ":not() Equals attribute", "#form select:not([name=select1])", ["select2", "select3"]); |
t( ":not() Equals quoted attribute", "#form select:not([name='select1'])", ["select2", "select3"]); |
@@ -1176,7 +1176,7 @@ |
<h1 id="header">jQuery Test Suite</h1> |
<h2 id="banner"></h2> |
<h2 id="userAgent"></h2> |
- |
+ |
<!-- Test HTML --> |
<div id="nothiddendiv" style="height:1px;background:white;"> |
@@ -1189,9 +1189,9 @@ |
<p id="firstp">See <a id="simon1" href="http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector" rel="bookmark">this blog entry</a> for more information.</p> |
<p id="ap"> |
- Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>, |
- <a id="groups" href="http://groups.google.com/">Google Groups</a>. |
- This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>: |
+ Here are some links in a normal paragraph: <a id="google" href="http://www.google.com/" title="Google!">Google</a>, |
+ <a id="groups" href="http://groups.google.com/">Google Groups</a>. |
+ This link has <code><a href="http://smin" id="anchor1">class="blog"</a></code>: |
<a href="http://diveintomark.org/" class="blog" hreflang="en" id="mark">diveintomark</a> |
</p> |
@@ -1218,14 +1218,14 @@ |
<input type="hidden" name="hidden" id="hidden1"/> |
<input type="text" style="display:none;" name="foo[bar]" id="hidden2"/> |
- |
+ |
<input type="text" id="name" name="name" value="name" /> |
- |
+ |
<button id="button" name="button">Button</button> |
- |
+ |
<textarea id="area1" maxlength="30">foobar</textarea> |
- |
+ |
<select name="select1" id="select1"> |
<option id="option1a" class="emptyopt" value="">Nothing</option> |
<option id="option1b" value="1">1</option> |
@@ -1246,20 +1246,20 @@ |
<option id="option3c" selected="selected" value="2">2</option> |
<option id="option3d" value="3">3</option> |
</select> |
- |
+ |
<object id="object1" codebase="stupid"> |
<param name="p1" value="x1" /> |
<param name="p2" value="x2" /> |
</object> |
- |
+ |
<span id="台北Táiběi"></span> |
<span id="台北" lang="中文"></span> |
<span id="utf8class1" class="台北Táiběi 台北"></span> |
<span id="utf8class2" class="台北"></span> |
<span id="foo:bar" class="foo:bar"></span> |
<span id="test.foo[5]bar" class="test.foo[5]bar"></span> |
- |
+ |
<foo_bar id="foobar">test element</foo_bar> |
</form> |
@@ -1271,27 +1271,27 @@ |
</form> |
<table id="table"></table> |
- |
+ |
<div id="fx-queue"> |
<div id="fadein" class='chain test'>fadeIn<div>fadeIn</div></div> |
<div id="fadeout" class='chain test out'>fadeOut<div>fadeOut</div></div> |
- |
+ |
<div id="show" class='chain test'>show<div>show</div></div> |
<div id="hide" class='chain test out'>hide<div>hide</div></div> |
- |
+ |
<div id="togglein" class='chain test'>togglein<div>togglein</div></div> |
<div id="toggleout" class='chain test out'>toggleout<div>toggleout</div></div> |
- |
- |
+ |
+ |
<div id="slideup" class='chain test'>slideUp<div>slideUp</div></div> |
<div id="slidedown" class='chain test out'>slideDown<div>slideDown</div></div> |
- |
+ |
<div id="slidetogglein" class='chain test'>slideToggleIn<div>slideToggleIn</div></div> |
<div id="slidetoggleout" class='chain test out'>slideToggleOut<div>slideToggleOut</div></div> |
</div> |
- |
+ |
<div id="fx-tests"></div> |
<form id="testForm" action="#" method="get"> |
@@ -1358,7 +1358,7 @@ Z</textarea> |
</div> |
</div> |
</dl> |
- |
+ |
<ol id="tests"></ol> |
</div> |
<ol id="results"></ol> |