| testRunner.dumpEditingCallbacks(); |
| <body onload="runTest()"> |
| This is a test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=8394">http://bugzilla.opendarwin.org/show_bug.cgi?id=8394</a> |
| Editable region does not accept dropped text if there is no selection</i>. |
| The text field should accept drag-and-dropped text, such as the link, even if |
| no text is currently selected. |
| <a id="link" href="http://www.ibm.com/">drop me into the text field</a> |
| window.testRunner.waitUntilDone(); |
| var link = document.getElementById("link"); |
| var x = link.offsetLeft + link.offsetWidth / 2; |
| var y = link.offsetTop + link.offsetHeight / 2; |
| eventSender.mouseMoveTo(x, y); |
| // Wait a moment so that the mouseDown will kick off a drag instead of starting a new selection. |
| eventSender.leapForward(400); |
| var field = document.getElementById("field"); |
| x = field.offsetLeft + field.offsetWidth / 2; |
| y = field.offsetTop + field.offsetHeight / 2; |
| eventSender.mouseMoveTo(x, y); |
| window.testRunner.notifyDone(); |