<!DOCTYPE html>
<html>
<body>
<!-- https://bugs.webkit.org/show_bug.cgi?id=50315 -->
When you click on 'link', a second 'abc' should get inserted after the first.
<span id="span">abc<br></span>
<span id="link">link</span>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
}
window.addEventListener('load', function() {
setTimeout(function() {
document.getElementById('link').onclick = function(){
var span = document.getElementById('span').cloneNode(true);
this.parentNode.insertBefore(span, this);
};
var testEl = document.getElementById("link");
var x = testEl.offsetLeft;
var y = testEl.offsetTop + testEl.offsetHeight / 2;
if (window.eventSender) {
eventSender.mouseMoveTo(x,y);
eventSender.mouseDown();
eventSender.mouseUp();
}
setTimeout(testRunner.notifyDone(), 0);
}, 0);
}, false);
</script>
</body>
</html>