blob: a4e3f37bfbee699a7ffa76e691c47f3de9b1c4fa [file] [log] [blame]
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
</script>
<body>
<script>
document.designMode = "on";
// Write out the link instead of putting it in the source. The changes necessary to make links accept a caret aren't made until a layout happens. This is a bug.
document.write("This is an <a id='link' href='http://www.google.com/'>editable link</a>.");
if (window.testRunner) {
var link = document.getElementById("link");
var x = link.offsetLeft + link.offsetParent.offsetLeft + link.offsetWidth / 2;
var y = link.offsetTop + link.offsetParent.offsetTop + link.offsetHeight / 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
</body>