3 testRunner
.dumpEditingCallbacks();
5 <body onload=
"runTest()">
7 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>
8 Editable region does not accept dropped text if there is no selection
</i>.
11 The text field should accept drag-and-dropped text, such as the link, even if
12 no text is currently selected.
16 <a id=
"link" href=
"http://www.ibm.com/">drop me into the text field
</a>
21 if (!window
.testRunner
)
24 window
.testRunner
.waitUntilDone();
26 var link
= document
.getElementById("link");
28 var x
= link
.offsetLeft
+ link
.offsetWidth
/ 2;
29 var y
= link
.offsetTop
+ link
.offsetHeight
/ 2;
31 eventSender
.mouseMoveTo(x
, y
);
32 eventSender
.mouseDown();
33 // Wait a moment so that the mouseDown will kick off a drag instead of starting a new selection.
34 eventSender
.leapForward(400);
35 var field
= document
.getElementById("field");
37 x
= field
.offsetLeft
+ field
.offsetWidth
/ 2;
38 y
= field
.offsetTop
+ field
.offsetHeight
/ 2;
40 eventSender
.mouseMoveTo(x
, y
);
41 eventSender
.mouseUp();
43 window
.testRunner
.notifyDone();