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 |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after 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}, | 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}, |
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}, | 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}, |
710 {name: "General sibling combinator, no whitespace (1)",
selector: "#sibling-p2~#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}, |
711 | 711 |
712 // Group of selectors (comma) | 712 // 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}, | 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}, |
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}, | 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}, |
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}, | 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}, |
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}, | 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}, |
717 ]; | 717 ]; |
OLD | NEW |