Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / mouse-down-on-pseudo-element-remove-crash.html
blobad7f9a2119baf0096364fec2a9e0e058ad88b0e4
1 <style>
2 .sample:before { content: "before "; }
3 </style>
4 <p>Click pseudo element and remove associated node crash</p>
5 <ul>
6 <li>Click "before"</li>
7 <li>Should not crash.</li>
8 </ul>
9 <span class="sample">foo</span>
10 <script>
11 document.addEventListener('mousedown', function(event) {
12 var node = event.srcElement;
13 node.parentNode.removeChild(node);
14 });
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';
25 </script>