OLD | NEW |
1 // Bit-mapped flags to indicate which tests the selector is suitable for | 1 // Bit-mapped flags to indicate which tests the selector is suitable for |
2 var TEST_QSA = 0x01; // querySelector() and querySelectorAll() test
s | 2 var TEST_QSA = 0x01; // querySelector() and querySelectorAll() test
s |
3 var TEST_FIND = 0x04; // find() and findAll() tests, may be unsuitab
le for querySelector[All] | 3 var TEST_FIND = 0x04; // find() and findAll() tests, may be unsuitab
le for querySelector[All] |
4 var TEST_MATCH = 0x10; // matches() tests | 4 var TEST_MATCH = 0x10; // matches() tests |
5 | 5 |
6 /* | 6 /* |
7 * All of these invalid selectors should result in a SyntaxError being thrown by
the APIs. | 7 * All of these invalid selectors should result in a SyntaxError being thrown by
the APIs. |
8 * | 8 * |
9 * name: A descriptive name of the selector being tested | 9 * name: A descriptive name of the selector being tested |
10 * selector: The selector to test | 10 * selector: The selector to test |
11 */ | 11 */ |
12 var invalidSelectors = [ | 12 var invalidSelectors = [ |
13 {name: "Empty String", selector: ""}, | 13 {name: "Empty String", selector: ""}, |
14 {name: "Invalid character", selector: "["}, | 14 {name: "Invalid character", selector: "["}, |
15 {name: "Invalid character", selector: "]"}, | 15 {name: "Invalid character", selector: "]"}, |
16 {name: "Invalid character", selector: "("}, | 16 {name: "Invalid character", selector: "("}, |
17 {name: "Invalid character", selector: ")"}, | 17 {name: "Invalid character", selector: ")"}, |
18 {name: "Invalid character", selector: "{"}, | 18 {name: "Invalid character", selector: "{"}, |
19 {name: "Invalid character", selector: "}"}, | 19 {name: "Invalid character", selector: "}"}, |
20 {name: "Invalid character", selector: "<"}, | 20 {name: "Invalid character", selector: "<"}, |
21 {name: "Invalid character", selector: ">"}, | 21 {name: "Invalid character", selector: ">"}, |
22 {name: "Invalid ID", selector: "#"}, | 22 {name: "Invalid ID", selector: "#"}, |
23 {name: "Invalid group of selectors", selector: "div,"}, | 23 {name: "Invalid group of selectors", selector: "div,"}, |
24 {name: "Invalid class", selector: "."}, | 24 {name: "Invalid class", selector: "."}, |
25 {name: "Invalid class", selector: ".5cm"}, | 25 {name: "Invalid class", selector: ".5cm"}, |
26 {name: "Invalid class", selector: "..test"}, | 26 {name: "Invalid class", selector: "..test"}, |
27 {name: "Invalid class", selector: ".foo..quux"}, | 27 {name: "Invalid class", selector: ".foo..quux"}, |
28 {name: "Invalid class", selector: ".bar."}, | 28 {name: "Invalid class", selector: ".bar."}, |
29 {name: "Invalid combinator", selector: "div & address, p"}, | 29 {name: "Invalid combinator", selector: "div & address, p"}, |
30 {name: "Invalid combinator", selector: "div >> address, p"}, | |
31 {name: "Invalid combinator", selector: "div ++ address, p"}, | 30 {name: "Invalid combinator", selector: "div ++ address, p"}, |
32 {name: "Invalid combinator", selector: "div ~~ address, p"}, | 31 {name: "Invalid combinator", selector: "div ~~ address, p"}, |
33 {name: "Invalid [att=value] selector", selector: "[*=test]"}, | 32 {name: "Invalid [att=value] selector", selector: "[*=test]"}, |
34 {name: "Invalid [att=value] selector", selector: "[*|*=test]"}, | 33 {name: "Invalid [att=value] selector", selector: "[*|*=test]"}, |
35 {name: "Invalid [att=value] selector", selector: "[class= space unquoted ]"}, | 34 {name: "Invalid [att=value] selector", selector: "[class= space unquoted ]"}, |
36 {name: "Unknown pseudo-class", selector: "div:example"}, | 35 {name: "Unknown pseudo-class", selector: "div:example"}, |
37 {name: "Unknown pseudo-class", selector: ":example"}, | 36 {name: "Unknown pseudo-class", selector: ":example"}, |
38 {name: "Unknown pseudo-element", selector: "div::example"}, | 37 {name: "Unknown pseudo-element", selector: "div::example"}, |
39 {name: "Unknown pseudo-element", selector: "::example"}, | 38 {name: "Unknown pseudo-element", selector: "::example"}, |
40 {name: "Invalid pseudo-element", selector: ":::before"}, | 39 {name: "Invalid pseudo-element", selector: ":::before"}, |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // - Descendant combinator ' ' | 298 // - Descendant combinator ' ' |
300 {name: "Descendant combinator, matching element that is a descendant of an ele
ment with id", selector: "#descendant div", ex
pect: ["descendant-div1", "descendant-div2", "descendant-div3", "descendant-div4
"], level: 1, testType: TEST_QSA | TEST_MATCH}, | 299 {name: "Descendant combinator, matching element that is a descendant of an ele
ment with id", selector: "#descendant div", ex
pect: ["descendant-div1", "descendant-div2", "descendant-div3", "descendant-div4
"], level: 1, testType: TEST_QSA | TEST_MATCH}, |
301 {name: "Descendant combinator, matching element with id that is a descendant o
f an element", selector: "body #descendant-div1", ex
pect: ["descendant-div1"], exclude: ["detached", "fragment"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 300 {name: "Descendant combinator, matching element with id that is a descendant o
f an element", selector: "body #descendant-div1", ex
pect: ["descendant-div1"], exclude: ["detached", "fragment"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
302 {name: "Descendant combinator, matching element with id that is a descendant o
f an element", selector: "div #descendant-div1", ex
pect: ["descendant-div1"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 301 {name: "Descendant combinator, matching element with id that is a descendant o
f an element", selector: "div #descendant-div1", ex
pect: ["descendant-div1"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
303 {name: "Descendant combinator, matching element with id that is a descendant o
f an element with id", selector: "#descendant #descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 302 {name: "Descendant combinator, matching element with id that is a descendant o
f an element with id", selector: "#descendant #descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
304 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with id", selector: "#descendant .descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 303 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with id", selector: "#descendant .descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
305 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with class", selector: ".descendant-div1 .descendant-div3", ex
pect: ["descendant-div3"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 304 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with class", selector: ".descendant-div1 .descendant-div3", ex
pect: ["descendant-div3"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
306 {name: "Descendant combinator, not matching element with id that is not a desc
endant of an element with id", selector: "#descendant-div1 #descendant-div4", ex
pect: [] /*no matches*/, level: 1, testType
: TEST_QSA}, | 305 {name: "Descendant combinator, not matching element with id that is not a desc
endant of an element with id", selector: "#descendant-div1 #descendant-div4", ex
pect: [] /*no matches*/, level: 1, testType
: TEST_QSA}, |
307 {name: "Descendant combinator, whitespace characters",
selector: "#descendant\t\r\n#descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, | 306 {name: "Descendant combinator, whitespace characters",
selector: "#descendant\t\r\n#descendant-div2", ex
pect: ["descendant-div2"], level: 1, testType
: TEST_QSA | TEST_MATCH}, |
308 | 307 |
| 308 // - Descendant combinator '>>' |
| 309 {name: "Descendant combinator '>>', matching element that is a descendant of a
n element with id", selector: "#descendant>>div",
expect: ["descendant-div1", "descendant-div2", "descendant-div3", "descendan
t-div4"], level: 1, testType: TEST_QSA | TEST_MATCH}, |
| 310 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element", selector: "body>>#descendant-div1",
expect: ["descendant-div1"], exclude: ["detached", "fragment"], level: 1, te
stType: TEST_QSA | TEST_MATCH}, |
| 311 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element", selector: "div>>#descendant-div1",
expect: ["descendant-div1"], level: 1, te
stType: TEST_QSA | TEST_MATCH}, |
| 312 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element with id", selector: "#descendant>>#descendant-div2",
expect: ["descendant-div2"], level: 1, te
stType: TEST_QSA | TEST_MATCH}, |
| 313 {name: "Descendant combinator '>>', matching element with class that is a desc
endant of an element with id", selector: "#descendant>>.descendant-div2",
expect: ["descendant-div2"], level: 1, te
stType: TEST_QSA | TEST_MATCH}, |
| 314 {name: "Descendant combinator '>>', matching element with class that is a desc
endant of an element with class", selector: ".descendant-div1>>.descendant-div
3", expect: ["descendant-div3"], level: 1, te
stType: TEST_QSA | TEST_MATCH}, |
| 315 {name: "Descendant combinator '>>', not matching element with id that is not a
descendant of an element with id", selector: "#descendant-div1>>#descendant-div
4", expect: [] /*no matches*/, level: 1, te
stType: TEST_QSA}, |
| 316 |
309 // - Child combinator '>' | 317 // - Child combinator '>' |
310 {name: "Child combinator, matching element that is a child of an element with
id", selector: "#child>div", expe
ct: ["child-div1", "child-div4"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 318 {name: "Child combinator, matching element that is a child of an element with
id", selector: "#child>div", expe
ct: ["child-div1", "child-div4"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
311 {name: "Child combinator, matching element with id that is a child of an eleme
nt", selector: "div>#child-div1", expe
ct: ["child-div1"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 319 {name: "Child combinator, matching element with id that is a child of an eleme
nt", selector: "div>#child-div1", expe
ct: ["child-div1"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
312 {name: "Child combinator, matching element with id that is a child of an eleme
nt with id", selector: "#child>#child-div1", expe
ct: ["child-div1"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 320 {name: "Child combinator, matching element with id that is a child of an eleme
nt with id", selector: "#child>#child-div1", expe
ct: ["child-div1"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
313 {name: "Child combinator, matching element with id that is a child of an eleme
nt with class", selector: "#child-div1>.child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 321 {name: "Child combinator, matching element with id that is a child of an eleme
nt with class", selector: "#child-div1>.child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
314 {name: "Child combinator, matching element with class that is a child of an el
ement with class", selector: ".child-div1>.child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 322 {name: "Child combinator, matching element with class that is a child of an el
ement with class", selector: ".child-div1>.child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
315 {name: "Child combinator, not matching element with id that is not a child of
an element with id", selector: "#child>#child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, | 323 {name: "Child combinator, not matching element with id that is not a child of
an element with id", selector: "#child>#child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, |
316 {name: "Child combinator, not matching element with id that is not a child of
an element with class", selector: "#child-div1>.child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, | 324 {name: "Child combinator, not matching element with id that is not a child of
an element with class", selector: "#child-div1>.child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, |
317 {name: "Child combinator, not matching element with class that is not a child
of an element with class", selector: ".child-div1>.child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, | 325 {name: "Child combinator, not matching element with class that is not a child
of an element with class", selector: ".child-div1>.child-div3", expe
ct: [] /*no matches*/, level: 2, testType: TEST_QSA}, |
318 {name: "Child combinator, surrounded by whitespace",
selector: "#child-div1\t\r\n>\t\r\n#child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, | 326 {name: "Child combinator, surrounded by whitespace",
selector: "#child-div1\t\r\n>\t\r\n#child-div2", expe
ct: ["child-div2"], level: 2, testType: TEST_QSA | TEST_MATCH}, |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 // - Descendant combinator ' ' | 670 // - Descendant combinator ' ' |
663 {name: "Descendant combinator, matching element that is a descendant of an ele
ment with id (1)", selector: "#descendant div",
ctx: "", expect: ["descendant-div1", "descendant-div2", "descendant-div3", "de
scendant-div4"], level: 1, testType: TEST_FIND | TEST_MATCH}, | 671 {name: "Descendant combinator, matching element that is a descendant of an ele
ment with id (1)", selector: "#descendant div",
ctx: "", expect: ["descendant-div1", "descendant-div2", "descendant-div3", "de
scendant-div4"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
664 {name: "Descendant combinator, matching element with id that is a descendant o
f an element (1)", selector: "body #descendant-div1",
ctx: "", expect: ["descendant-div1"], exclude: ["detached", "fragment"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 672 {name: "Descendant combinator, matching element with id that is a descendant o
f an element (1)", selector: "body #descendant-div1",
ctx: "", expect: ["descendant-div1"], exclude: ["detached", "fragment"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
665 {name: "Descendant combinator, matching element with id that is a descendant o
f an element (1)", selector: "div #descendant-div1",
ctx: "", expect: ["descendant-div1"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 673 {name: "Descendant combinator, matching element with id that is a descendant o
f an element (1)", selector: "div #descendant-div1",
ctx: "", expect: ["descendant-div1"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
666 {name: "Descendant combinator, matching element with id that is a descendant o
f an element with id (1)", selector: "#descendant #descendant-div2",
ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 674 {name: "Descendant combinator, matching element with id that is a descendant o
f an element with id (1)", selector: "#descendant #descendant-div2",
ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
667 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with id (1)", selector: "#descendant .descendant-div2",
ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 675 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with id (1)", selector: "#descendant .descendant-div2",
ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
668 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with class (1)", selector: ".descendant-div1 .descendant-div3"
, ctx: "", expect: ["descendant-div3"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 676 {name: "Descendant combinator, matching element with class that is a descendan
t of an element with class (1)", selector: ".descendant-div1 .descendant-div3"
, ctx: "", expect: ["descendant-div3"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
669 {name: "Descendant combinator, not matching element with id that is not a desc
endant of an element with id", selector: "#descendant-div1 #descendant-div4", ct
x: "", expect: [] /*no matches*/, level: 1,
testType: TEST_FIND}, | 677 {name: "Descendant combinator, not matching element with id that is not a desc
endant of an element with id", selector: "#descendant-div1 #descendant-div4", ct
x: "", expect: [] /*no matches*/, level: 1,
testType: TEST_FIND}, |
670 {name: "Descendant combinator, whitespace characters (1)",
selector: "#descendant\t\r\n#descendant-div2"
, ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, | 678 {name: "Descendant combinator, whitespace characters (1)",
selector: "#descendant\t\r\n#descendant-div2"
, ctx: "", expect: ["descendant-div2"], level
: 1, testType: TEST_FIND | TEST_MATCH}, |
671 | 679 |
| 680 // - Descendant combinator '>>' |
| 681 {name: "Descendant combinator '>>', matching element that is a descendant of a
n element with id (1)", selector: "#descendant>>div",
ctx: "", expect: ["descendant-div1", "descendant-div2", "descendant-div3
", "descendant-div4"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 682 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element (1)", selector: "body>>#descendant-div1",
ctx: "", expect: ["descendant-div1"], exclude: ["detached", "fragment"],
level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 683 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element (1)", selector: "div>>#descendant-div1",
ctx: "", expect: ["descendant-div1"],
level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 684 {name: "Descendant combinator '>>', matching element with id that is a descend
ant of an element with id (1)", selector: "#descendant>>#descendant-div2
", ctx: "", expect: ["descendant-div2"],
level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 685 {name: "Descendant combinator '>>', matching element with class that is a desc
endant of an element with id (1)", selector: "#descendant>>.descendant-div2
", ctx: "", expect: ["descendant-div2"],
level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 686 {name: "Descendant combinator, '>>', matching element with class that is a des
cendant of an element with class (1)", selector: ".descendant-div1>>.descendan
t-div3", ctx: "", expect: ["descendant-div3"],
level: 1, testType: TEST_FIND | TEST_MATCH}, |
| 687 {name: "Descendant combinator '>>', not matching element with id that is not a
descendant of an element with id", selector: "#descendant-div1>>#descendant-div
4", ctx: "", expect: [] /*no matches*/, lev
el: 1, testType: TEST_FIND}, |
| 688 |
672 // - Child combinator '>' | 689 // - Child combinator '>' |
673 {name: "Child combinator, matching element that is a child of an element with
id (1)", selector: "#child>div",
ctx: "", expect: ["child-div1", "child-div4"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 690 {name: "Child combinator, matching element that is a child of an element with
id (1)", selector: "#child>div",
ctx: "", expect: ["child-div1", "child-div4"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
674 {name: "Child combinator, matching element with id that is a child of an eleme
nt (1)", selector: "div>#child-div1",
ctx: "", expect: ["child-div1"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 691 {name: "Child combinator, matching element with id that is a child of an eleme
nt (1)", selector: "div>#child-div1",
ctx: "", expect: ["child-div1"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
675 {name: "Child combinator, matching element with id that is a child of an eleme
nt with id (1)", selector: "#child>#child-div1",
ctx: "", expect: ["child-div1"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 692 {name: "Child combinator, matching element with id that is a child of an eleme
nt with id (1)", selector: "#child>#child-div1",
ctx: "", expect: ["child-div1"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
676 {name: "Child combinator, matching element with id that is a child of an eleme
nt with class (1)", selector: "#child-div1>.child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 693 {name: "Child combinator, matching element with id that is a child of an eleme
nt with class (1)", selector: "#child-div1>.child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
677 {name: "Child combinator, matching element with class that is a child of an el
ement with class (1)", selector: ".child-div1>.child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 694 {name: "Child combinator, matching element with class that is a child of an el
ement with class (1)", selector: ".child-div1>.child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
678 {name: "Child combinator, not matching element with id that is not a child of
an element with id", selector: "#child>#child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, | 695 {name: "Child combinator, not matching element with id that is not a child of
an element with id", selector: "#child>#child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, |
679 {name: "Child combinator, not matching element with id that is not a child of
an element with class", selector: "#child-div1>.child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, | 696 {name: "Child combinator, not matching element with id that is not a child of
an element with class", selector: "#child-div1>.child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, |
680 {name: "Child combinator, not matching element with class that is not a child
of an element with class", selector: ".child-div1>.child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, | 697 {name: "Child combinator, not matching element with class that is not a child
of an element with class", selector: ".child-div1>.child-div3", ctx:
"", expect: [] /*no matches*/, level: 2, testType: TEST_FIND}, |
681 {name: "Child combinator, surrounded by whitespace (1)",
selector: "#child-div1\t\r\n>\t\r\n#child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, | 698 {name: "Child combinator, surrounded by whitespace (1)",
selector: "#child-div1\t\r\n>\t\r\n#child-div2",
ctx: "", expect: ["child-div2"], level: 2, testType: TEST_FIND | T
EST_MATCH}, |
(...skipping 26 matching lines...) Expand all Loading... |
708 {name: "General sibling combinator, whitespace after (1)",
selector: "#sibling-p2~\t\r\n#sibling-p3
", ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, | 725 {name: "General sibling combinator, whitespace after (1)",
selector: "#sibling-p2~\t\r\n#sibling-p3
", ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, |
709 {name: "General sibling combinator, whitespace before (1)",
selector: "#sibling-p2\t\r\n~#sibling-p3
", ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, | 726 {name: "General sibling combinator, whitespace before (1)",
selector: "#sibling-p2\t\r\n~#sibling-p3
", ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, |
710 {name: "General sibling combinator, no whitespace (1)",
selector: "#sibling-p2~#sibling-p3",
ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, | 727 {name: "General sibling combinator, no whitespace (1)",
selector: "#sibling-p2~#sibling-p3",
ctx: "", expect: ["sibling-p3"],
level: 3, testType: TEST_FIND | TEST_MATCH}, |
711 | 728 |
712 // Group of selectors (comma) | 729 // Group of selectors (comma) |
713 {name: "Syntax, group of selectors separator, surrounded by whitespace (1)", s
elector: "#group em\t\r \n,\t\r \n#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, | 730 {name: "Syntax, group of selectors separator, surrounded by whitespace (1)", s
elector: "#group em\t\r \n,\t\r \n#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
714 {name: "Syntax, group of selectors separator, whitespace after (1)", s
elector: "#group em,\t\r\n#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, | 731 {name: "Syntax, group of selectors separator, whitespace after (1)", s
elector: "#group em,\t\r\n#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
715 {name: "Syntax, group of selectors separator, whitespace before (1)", s
elector: "#group em\t\r\n,#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, | 732 {name: "Syntax, group of selectors separator, whitespace before (1)", s
elector: "#group em\t\r\n,#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
716 {name: "Syntax, group of selectors separator, no whitespace (1)", s
elector: "#group em,#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, | 733 {name: "Syntax, group of selectors separator, no whitespace (1)", s
elector: "#group em,#group strong", ctx: "", expect: ["group-em1",
"group-strong1"], level: 1, testType: TEST_FIND | TEST_MATCH}, |
717 ]; | 734 ]; |
OLD | NEW |