blob: 0a7a86409afaa79a8a104163dcadd41cd4b152d0 [file] [log] [blame]
Test style update of :nth-child() when the tree structure is modified. In this case, :nth-child() is not the last component of the compound selector, which is a bit less common.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Initialy, <foo> is the first of its type, the style should match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(1, 2, 3)"
Adding an element <testnode> on top, we should now match 4 and 5.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
Adding an element <nottestnode> on top, we should now match 3, 4 and 5.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
Adding an element <nottestnode> on top, we should now match 2, 3, 4 and 5.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(1, 2, 3)"
Adding an element <testnode> on top, we should now match 1, 2, 3, 4 and 5.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(1, 2, 3)"
Adding an element <nottestnode> on top, we should now match 0, 1, 2, 3, 4 and 5.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[18]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[19]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <nottestnode>, 0 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <testnode>, 1 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <notestnode>, 2 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[12]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[13]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <testnode>, 3 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <testnode>, 4 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[8]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[9]).backgroundColor is "rgb(1, 2, 3)"
Removing one of the <testnode>, there are only 4 siblings left, nothing can match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[4]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[5]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[6]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[7]).backgroundColor is "rgb(255, 255, 255)"
PASS successfullyParsed is true
TEST COMPLETE