blob: ad7f9a2119baf0096364fec2a9e0e058ad88b0e4 [file] [log] [blame]
<style>
.sample:before { content: "before "; }
</style>
<p>Click pseudo element and remove associated node crash</p>
<ul>
<li>Click "before"</li>
<li>Should not crash.</li>
</ul>
<span class="sample">foo</span>
<script>
document.addEventListener('mousedown', function(event) {
var node = event.srcElement;
node.parentNode.removeChild(node);
});
if (window.testRunner)
testRunner.dumpAsText();
var sample = document.querySelector('.sample');
if (window.eventSender) {
eventSender.mouseMoveTo(sample.offsetLeft + 5, sample.offsetTop + 5);
eventSender.mouseDown();
document.body.textContent = 'PASS; NOT CRASHED';
}
</script>