Skip to content

Commit 2c5fce4

Browse files
committed
added more tests related to white-space in pseudo-class parameters, removed a duplicate test in 'css3-escapes' and related WPT test, marked as passing the 'dir()' pseudo-class
1 parent 9dfcc2a commit 2c5fce4

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

test/W3C-Selector-tests/W3C-Selector-tests-nwsapi.html

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,18 +605,18 @@
605605
t( "Multiple ID selectors using UTF8", "#台北Táiběi, #台北", ["台北Táiběi","台北"] );
606606
t( "Descendant ID selector using UTF8", "div #台北", ["台北"] );
607607
t( "Child ID selector using UTF8", "form > #台北", ["台北"] );
608-
608+
609609
t( "Escaped ID", "#foo\\:bar", ["foo:bar"] );
610610
t( "Escaped ID", "#test\\.foo\\[5\\]bar", ["test.foo[5]bar"] );
611611
t( "Descendant escaped ID", "div #foo\\:bar", ["foo:bar"] );
612612
t( "Descendant escaped ID", "div #test\\.foo\\[5\\]bar", ["test.foo[5]bar"] );
613613
t( "Child escaped ID", "form > #foo\\:bar", ["foo:bar"] );
614614
t( "Child escaped ID", "form > #test\\.foo\\[5\\]bar", ["test.foo[5]bar"] );
615-
615+
616616
t( "ID Selector, child ID present", "#form > #radio1", ["radio1"] ); // bug #267
617617
t( "ID Selector, not an ancestor ID", "#form #first", [] );
618618
t( "ID Selector, not a child ID", "#form > #option1a", [] );
619-
619+
620620
t( "All Children of ID", "#foo > *", ["sndp", "en", "sap"] );
621621
t( "All Children of ID with no children", "#firstUL > *", [] );
622622

@@ -628,7 +628,7 @@
628628
t( "Class Selector", ".blog.link", ["simon"] );
629629
t( "Class Selector w/ Element", "a.blog", ["mark","simon"] );
630630
t( "Parent Class Selector", "p .blog", ["mark","simon"] );
631-
631+
632632
t( "Class selector using UTF8", ".台北Táiběi", ["utf8class1"] );
633633
t( "Class selector using UTF8", ".台北", ["utf8class1","utf8class2"] );
634634
t( "Class selector using UTF8", ".台北Táiběi.台北", ["utf8class1"] );
@@ -690,6 +690,15 @@
690690
t( "Nth-child", "#form #select1 option:nth-child(3n+0)", ["option1c"] );
691691
t( "Nth-child", "#form #select1 option:nth-child(-n+3)", ["option1a", "option1b", "option1c"] );
692692

693+
t( "Pseudo-class with multiple WSP leading and around parameters", "#form #select1 option:nth-child( 3n - 3)", ["option1c"] );
694+
t( "Pseudo-class with multiple WSP trailing and around parameters", "#form #select1 option:nth-child(3n - 3 )", ["option1c"] );
695+
t( "Pseudo-class with \\t and WSP leading and around parameters", "#form #select1 option:nth-child(\t 3n - 3)", ["option1c"] );
696+
t( "Pseudo-class with \\t and WSP trailing and around parameters", "#form #select1 option:nth-child(3n - 3 \t)", ["option1c"] );
697+
t( "Pseudo-class with WSP and \\t before and around parameters", "#form #select1 option:nth-child( \t 3n - 3)", ["option1c"] );
698+
t( "Pseudo-class with WSP and \\t after and around parameters", "#form #select1 option:nth-child(3n - 3 \t )", ["option1c"] );
699+
t( "Pseudo-class with multiple WSP and \\t mixed before parameters", "#form #select1 option:nth-child( \t\t\t 3n - 3)", ["option1c"] );
700+
t( "Pseudo-class with multiple WSP and \\t mixed after parameters", "#form #select1 option:nth-child(3n - 3 \t\t\t )", ["option1c"] );
701+
693702
t( "Attribute Exists", "a[title]", ["google"] );
694703
t( "Attribute Exists", "*[title]", ["google"] );
695704
t( "Attribute Exists", "[title]", ["google"] );

test/css3-escape/test_nwsapi_escaped_identifiers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ testMatched("\u{fffd}surrogate", "#\\00DFFFsurrogate");
107107
testMatched("\u{10ffff}", "#\\10fFfF");
108108
testMatched("\u{10ffff}0", "#\\10fFfF0");
109109
testMatched("\u{100000}00", "#\\10000000");
110-
testMatched("eof\u{fffd}", "#eof\\");
111110

112111
testMatched("simple-ident", "#simple-ident");
113112
testMatched("testing123", "#testing123");

test/w3c/index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h3>Latest W3C test suite</h3>
2828
it is possible to press CTRL+ALT keys to switch between native (#w3) and nwsapi (#nw)</p>
2929

3030
<p><strong>WPT /dom/nodes/ - querySelector, querySelectorAll, matches, closest (Level 4):</strong></p>
31+
3132
<ul>
3233
<li><a href="/dom/nodes/ParentNode-querySelector-All-xht.xht">querySelector All - XHTML</a></li>
3334
<li><a href="/dom/nodes/ParentNode-querySelector-All.html">querySelector All - HTML</a></li>
@@ -36,13 +37,14 @@ <h3>Latest W3C test suite</h3>
3637
</ul>
3738

3839
<p><strong>WPT /html/semantics/selectors/pseudo-classes - (Level 4):</strong></p>
40+
3941
<ul>
4042
<li><a href="/html/semantics/selectors/pseudo-classes/checked-001-manual.html">checked-001-manual.html</a><span></span></li>
4143
<li><a href="/html/semantics/selectors/pseudo-classes/checked.html">checked.html</a><span></span></li>
4244
<li><a href="/html/semantics/selectors/pseudo-classes/checked-type-change.html">checked-type-change.html</a><span></span></li>
4345
<li><a href="/html/semantics/selectors/pseudo-classes/default.html">default.html</a><span></span></li>
44-
<li><a href="/html/semantics/selectors/pseudo-classes/dir.html">dir.html</a><span> (not implemented)</span><span> (not implemented)</span></li>
45-
<li><a href="/html/semantics/selectors/pseudo-classes/dir01.html">dir01.html</a><span> (not implemented)</span><span> (not implemented)</span></li>
46+
<li><a href="/html/semantics/selectors/pseudo-classes/dir.html">dir.html</a><span></span><span></span></li>
47+
<li><a href="/html/semantics/selectors/pseudo-classes/dir01.html">dir01.html</a><span></span><span></span></li>
4648
<li><a href="/html/semantics/selectors/pseudo-classes/disabled.html">disabled.html</a><span></span></li>
4749
<li><a href="/html/semantics/selectors/pseudo-classes/enabled.html">enabled.html</a><span></span></li>
4850
<li><a href="/html/semantics/selectors/pseudo-classes/focus-autofocus.html">focus-autofocus.html</a><span></span></li>
@@ -62,6 +64,7 @@ <h3>Latest W3C test suite</h3>
6264
</ul>
6365

6466
<p><strong>WPT /html/semantics/selectors/pseudo-classes - (Level 4):</strong></p>
67+
6568
<ul>
6669
<li><a href="/html/syntax/parsing/template/additions-to-foster-parenting/template-is-a-foster-parent-element.html">template-is-a-foster-parent-element.html</a><span></span></li>
6770
<li><a href="/html/syntax/parsing/template/additions-to-foster-parenting/template-is-not-a-foster-parent-element.html">template-is-not-a-foster-parent-element.html</a><span></span></li>
@@ -76,14 +79,16 @@ <h3>Latest W3C test suite</h3>
7679
</ul>
7780

7881
<p><strong>WPT /css/selectors & /css/selectors/attribute-selectors/attribute-case - Edge cases</strong></p>
82+
7983
<ul>
80-
<li><a href="/css/selectors/child-indexed-pseudo-class.html">child-indexed-pseudo-class.html</a><span></span></li>
81-
<li><a href="/css/selectors/missing-right-token.html">missing-right-token.html</a><span></span></li>
82-
<li><a href="/css/selectors/attribute-selectors/attribute-case/semantics.html">semantics.html</a><span></span></li>
83-
<li><a href="/css/selectors/attribute-selectors/attribute-case/syntax.html">syntax.html</a><span></span></li>
84+
<li><a href="/css/selectors/child-indexed-pseudo-class.html">child-indexed-pseudo-class.html</a><span></span></li>
85+
<li><a href="/css/selectors/missing-right-token.html">missing-right-token.html</a><span></span></li>
86+
<li><a href="/css/selectors/attribute-selectors/attribute-case/semantics.html">semantics.html</a><span></span></li>
87+
<li><a href="/css/selectors/attribute-selectors/attribute-case/syntax.html">syntax.html</a><span></span></li>
8488
</ul>
8589

8690
<p><strong>JSDOM specific tests depending on NWSAPI</strong></p>
91+
8792
<ul>
8893
<li><a href="/jsdom/dom/nodes/DocumentFragment-getElementById.html">DocumentFragment-getElementById.html</a><span></span></li>
8994
<li><a href="/jsdom/dom/nodes/Node-cloneNode-svg.html">Node-cloneNode-svg.html</a><span></span></li>

test/w3c/jsdom/dom/nodes/ParentNode-querySelector-escapes.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
testMatched("\u{10ffff}", "#\\10fFfF");
105105
testMatched("\u{10ffff}0", "#\\10fFfF0");
106106
testMatched("\u{100000}00", "#\\10000000");
107-
testMatched("eof\u{fffd}", "#eof\\");
108107

109108
testMatched("simple-ident", "#simple-ident");
110109
testMatched("testing123", "#testing123");

0 commit comments

Comments
 (0)