<!DOCTYPE html>
<html>
<script>
setInterval(function(){
    var elements = document.getElementsByTagName("*");
    var didRemoveElement = false;
    for (var i = 0; i < elements.length; i++) {
        var element = elements.item(i);
        if (!element.firstElementChild && element != document.documentElement) {
            didRemoveElement = true;
            try { 
                element.parentNode.removeChild(element)
            } catch(e) { }
        }
    }

    if (!didRemoveElement)
        document.documentElement.innerHTML = "PASS. WebKit didn't crash.";
}, 100);
</script>
<style>
#test1:after {
    float: left; 
    content: 'A';
}
</style>
<svg>
<text>
<a id="test1">
A
</a>
</text>
</svg>
</html>