haikuwebkit/LayoutTests/fast/selectors/nth-last-child-of-cannot-ma...

17 lines
756 B
Plaintext

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