blob: 22a56152d835caccf48f7cad80354b8ac6d06054 [file] [log] [blame]
Verify the nth-last-child() pseudo class does not leak registers.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.querySelectorAll("body:nth-last-child(n) div:nth-last-child(n) ul:nth-last-child(n) li:nth-last-child(n) span:nth-last-child(n) span:nth-last-child(n) span:nth-last-child(n) span:nth-last-child(n) span:nth-last-child(n) span:nth-last-child(n)").length is 1
PASS getComputedStyle(document.getElementById("target")).backgroundColor is "rgb(1, 2, 3)"
PASS document.querySelectorAll("body:nth-last-child(n+1) div:nth-last-child(n+1) ul:nth-last-child(n+1) li:nth-last-child(n+1) span:nth-last-child(n+1) span:nth-last-child(n+1) span:nth-last-child(n+1) span:nth-last-child(n+1) span:nth-last-child(n+1) span:nth-last-child(n+1)").length is 1
PASS getComputedStyle(document.getElementById("target")).color is "rgb(4, 5, 6)"
PASS document.querySelectorAll("body:nth-last-child(1) div:nth-last-child(1) ul:nth-last-child(1) li:nth-last-child(1) span:nth-last-child(1) span:nth-last-child(1) span:nth-last-child(1) span:nth-last-child(1) span:nth-last-child(1) span:nth-last-child(1)").length is 0
PASS document.querySelectorAll("body:nth-last-child(2) div:nth-last-child(2) ul:nth-last-child(2) li:nth-last-child(2) span:nth-last-child(2) span:nth-last-child(2) span:nth-last-child(2) span:nth-last-child(2) span:nth-last-child(2) span:nth-last-child(2)").length is 0
PASS document.querySelectorAll("body:nth-last-child(2n) div:nth-last-child(2n) ul:nth-last-child(2n) li:nth-last-child(2n) span:nth-last-child(2n) span:nth-last-child(2n) span:nth-last-child(2n) span:nth-last-child(2n) span:nth-last-child(2n) span:nth-last-child(2n)").length is 0
PASS document.querySelectorAll("body:nth-last-child(2n+1) div:nth-last-child(2n+1) ul:nth-last-child(2n+1) li:nth-last-child(2n+1) span:nth-last-child(2n+1) span:nth-last-child(2n+1) span:nth-last-child(2n+1) span:nth-last-child(2n+1) span:nth-last-child(2n+1) span:nth-last-child(2n+1)").length is 0
PASS successfullyParsed is true
TEST COMPLETE