blob: a9d195e1e3a63f0aad51e83ad717d0d1b0c388c5 [file] [log] [blame]
<!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>