<!DOCTYPE html>
<html>
<style>
:target { top: 0; }
</style>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

document.styleSheets[0].cssRules[0].selectorText = ':target';
</script>
Test passes if it does not crash.
</html>

