4 function log(message
) {
5 var console
= document
.getElementById("console");
6 var li
= document
.createElement("li");
7 var text
= document
.createTextNode(message
);
9 console
.appendChild(li
);
14 if (!window
.testRunner
) {
15 log("To run this test manually attempt to drag and drop Abe after the broken image in the editable div");
19 testRunner
.waitUntilDone();
22 var dragme
= document
.getElementById("dragme");
23 x1
= dragme
.offsetLeft
+ 20;
24 y1
= dragme
.offsetTop
+ 20;
27 var drag_target
= document
.getElementById("drag_target");
28 x2
= drag_target
.offsetLeft
+ drag_target
.offsetWidth
/ 2;
29 y2
= drag_target
.offsetTop
+ drag_target
.offsetHeight
/ 2;
31 // Drag abe into the editable
32 eventSender
.mouseMoveTo(x1
, y1
);
33 eventSender
.mouseDown();
34 eventSender
.leapForward(500);
35 eventSender
.mouseMoveTo(x2
, y2
);
36 eventSender
.mouseUp();
38 testRunner
.notifyDone();
42 <title>Dragging an image to the end of a content editable div in an iframe
</title>
44 <body onload=
"runTest()">
45 <p>This tests that we can drag an image into the last position of a content editable div in an iframe that already contains an image, without crashing.
</p>
47 <img id=
"dragme" src=
"../resources/abe.png"/>
48 <iframe id=
"drag_target" src=
"resources/drag-image-to-contenteditable-iframe.html"></iframe>
49 <ul id=
"console"></ul>