This test makes sure that :scope with id filter works correctly. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS scope.parentNode.querySelectorAll(":scope #scope a").item(0) is scope.firstChild PASS scope.parentNode.querySelectorAll(":scope #scope a").length is 1 PASS scope.querySelectorAll(":scope #scope a").length is 0 PASS scope.parentNode.querySelectorAll(":scope #scope + li").length is 1 PASS scope.parentNode.querySelectorAll(":scope #scope + li").item(0) is scope.parentNode.children[1] PASS document.querySelectorAll(":scope #scope a").item(0) is scope.firstChild PASS successfullyParsed is true TEST COMPLETE abc def efg