blob: debab4af8a6fcd8ef9c1ca6ce30f48c7f76d1396 [file] [log] [blame]
Test style update of :nth-last-child() when the tree structure is modified. In this case, :nth-last-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, only the first element should match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
Adding an element <testnode> on top, we should now match 0 and 1.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
Adding an element <nottestnode> on top, we should now match -1, 0 and 1.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
Adding an element <nottestnode> on top, we should now match -2, -1, 0 and 1.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(1, 2, 3)"
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 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(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
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(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(255, 255, 255)"
Adding an element <testnode> on top, we should now match -3, -2, -1, 0 and 1.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(1, 2, 3)"
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)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(1, 2, 3)"
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)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(255, 255, 255)"
Adding an element <nottestnode> on top, we should now match -4, -3, -2, -1, 0 and 1.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(1, 2, 3)"
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)"
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)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[18]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[19]).backgroundColor is "rgb(255, 255, 255)"
Removing one of the <nottestnode>, -2 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(1, 2, 3)"
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)"
PASS getComputedStyle(document.querySelectorAll("testnode")[10]).backgroundColor is "rgb(1, 2, 3)"
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)"
PASS getComputedStyle(document.querySelectorAll("testnode")[14]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[16]).backgroundColor is "rgb(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[17]).backgroundColor is "rgb(255, 255, 255)"
Removing one of the <testnode>, -4 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[3]).backgroundColor is "rgb(1, 2, 3)"
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 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(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[11]).backgroundColor is "rgb(1, 2, 3)"
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(255, 255, 255)"
PASS getComputedStyle(document.querySelectorAll("testnode")[15]).backgroundColor is "rgb(255, 255, 255)"
Removing one of the <notestnode>, -1 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[2]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
Removing one of the <testnode>, -3 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
PASS getComputedStyle(document.querySelectorAll("testnode")[1]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
Removing one of the <testnode>, 0 should no longer match.
PASS getComputedStyle(document.querySelectorAll("testnode")[0]).backgroundColor is "rgb(1, 2, 3)"
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(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)"
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