This test makes sure that :scope works correctly with the closest() API. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS theTarget.closest(":scope") is theTarget PASS theTarget.closest(":not(:scope)") is body PASS theTarget.closest("body :scope") is theTarget PASS theTarget.closest("body > :scope") is theTarget PASS theTarget.closest("body:scope") is null PASS theTarget.closest("sibling + :scope") is theTarget PASS theTarget.closest("sibling ~ :scope") is theTarget PASS theTarget.closest("#theTarget:scope") is theTarget PASS theTarget.closest(":scope#theTarget") is theTarget PASS theTarget.closest("[webkit]:scope#theTarget") is theTarget PASS theTarget.closest(":not([webkit=fast]):scope#theTarget") is null PASS theTarget.closest(":scope target") is null PASS theTarget.closest(":scope > target") is null PASS theTarget.closest(":scope + target") is null PASS theTarget.closest(":scope ~ target") is null PASS theTarget.closest(":scope *") is null PASS theTarget.closest(":scope > *") is null PASS theTarget.closest(":scope + *") is null PASS theTarget.closest(":scope ~ *") is null PASS successfullyParsed is true TEST COMPLETE