2 .sample:before { content:
"before "; }
4 <p>Click pseudo element and remove associated node crash
</p>
6 <li>Click
"before"</li>
7 <li>Should not crash.
</li>
9 <span class=
"sample">foo
</span>
11 document
.addEventListener('mousedown', function(event
) {
12 var node
= event
.srcElement
;
13 node
.parentNode
.removeChild(node
);
16 if (window
.testRunner
)
17 testRunner
.dumpAsText();
19 var sample
= document
.querySelector('.sample');
20 if (window
.eventSender
) {
21 eventSender
.mouseMoveTo(sample
.offsetLeft
+ 5, sample
.offsetTop
+ 5);
22 eventSender
.mouseDown();
23 document
.body
.textContent
= 'PASS; NOT CRASHED';