blob: a0b6cf336167a3e2a4c96bec495b5863cabffd99 [file] [log] [blame]
Test chaining :nth-child(An+B) selectors does not aggregate separate selectors.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing "testcaseA:nth-child(2n of testcaseA)"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)').length is 7
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[0].id is "testcase3"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[1].id is "testcase7"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[2].id is "testcase11"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[3].id is "testcase15"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[4].id is "testcase19"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[5].id is "testcase23"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA)')[6].id is "testcase27"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcaseA:nth-child(2n of [attribute1])"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])').length is 6
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[0].id is "testcase3"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[1].id is "testcase11"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[2].id is "testcase13"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[3].id is "testcase21"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[4].id is "testcase23"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of [attribute1])')[5].id is "testcase25"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])').length is 3
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[0].id is "testcase3"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[1].id is "testcase11"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA):nth-child(2n of [attribute1])')[2].id is "testcase23"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
Testing "testcaseA:nth-child(2n of testcaseA, [attribute1])"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])').length is 11
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[0].id is "testcase3"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[1].id is "testcase5"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[2].id is "testcase7"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[3].id is "testcase9"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[4].id is "testcase11"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[5].id is "testcase13"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[6].id is "testcase21"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[7].id is "testcase23"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[8].id is "testcase25"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[9].id is "testcase27"
PASS document.querySelectorAll('#test-root testcaseA:nth-child(2n of testcaseA, [attribute1])')[10].id is "testcase29"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[0]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[1]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[2]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[3]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[4]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[5]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[6]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[7]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[8]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[9]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[10]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[11]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[12]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[13]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[14]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[15]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[16]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[17]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[18]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[19]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[20]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[21]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[22]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[23]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[24]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[25]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[26]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[27]).backgroundColor is "rgb(255, 0, 0)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[28]).backgroundColor is "rgb(10, 100, 200)"
PASS getComputedStyle(document.querySelectorAll("#test-root *")[29]).backgroundColor is "rgb(255, 0, 0)"
PASS successfullyParsed is true
TEST COMPLETE