4 if (window
.testRunner
) {
5 testRunner
.waitUntilDone();
6 testRunner
.dumpAsText();
9 function log(message
) {
10 var console
= document
.getElementById("console");
11 var li
= document
.createElement("li");
12 var text
= document
.createTextNode(message
);
14 console
.appendChild(li
);
19 window
.frames
[0].document
.write("<div contenteditable>drag<img src='../resources/abe.png' id=dragme>me<span id=target> </span></div>");
20 setTimeout("step2()", 100);
24 if (!window
.testRunner
) {
25 log("This test uses eventSender. To run it manually, drag the selected image to another position in the editable div and drop it. It should not disappear.");
29 var doc
= window
.frames
[0].document
;
30 e
= doc
.getElementById("dragme");
31 x
= e
.offsetLeft
+ e
.offsetWidth
/ 2;
32 y
= e
.offsetTop
+ e
.offsetHeight
/ 2;
34 eventSender
.mouseMoveTo(x
, y
);
35 eventSender
.mouseDown();
36 e
= doc
.getElementById("target");
37 x
= e
.offsetLeft
+ e
.offsetWidth
/ 2;
38 y
= e
.offsetTop
+ e
.offsetHeight
/ 2;
40 eventSender
.mouseMoveTo(x
, y
);
41 eventSender
.mouseUp();
43 document
.write("<p><a href='http://bugs.webkit.org/show_bug.cgi?id=14428'>Bug 14428</a>: FCKEditor: Images disappear on drag/drop and copy/paste</p>");
45 if (doc
.getElementById("dragme").parentNode
.tagName
== "SPAN" && doc
.getElementById("dragme").src
.length
> 10)
46 document
.write("<p>SUCCESS</p>");
48 document
.write("<p>FAILURE</p>");
50 testRunner
.notifyDone();
54 <body onload=
"setTimeout('step1()', 100)">
55 <iframe src=
"about:blank"></iframe>
56 <ul id=
"console"></ul>