blob: cd69a4b484cc392164c71f7206c5df61b0ed16a2 [file] [log] [blame]
The selector :nth-last-child() should fail to match if the following sibling have not been parsed yet.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Testing the state in the middle of HTML parsing.
PASS document.querySelectorAll(":nth-last-child(even of target)").length is 0
PASS getComputedStyle(document.getElementById("target")).backgroundColor is "rgb(255, 255, 255)"
Testing the state after parsing the test sub-tree.
PASS document.querySelectorAll(":nth-last-child(n of target)").length is 2
PASS document.querySelectorAll(":nth-last-child(even of target)").length is 1
PASS getComputedStyle(document.getElementById("target")).backgroundColor is "rgb(1, 2, 3)"
PASS successfullyParsed is true
TEST COMPLETE