Change log level: info -> debug
[framework/web/webkit-efl.git] / LayoutTests / editing / pasteboard / drag-image-in-about-blank-frame.html
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5     testRunner.waitUntilDone();
6     testRunner.dumpAsText();
7 }
8
9 function log(message) {
10     var console = document.getElementById("console");
11     var li = document.createElement("li");
12     var text = document.createTextNode(message);
13     
14     console.appendChild(li);
15     li.appendChild(text);
16 }
17
18 function step1() {
19     window.frames[0].document.write("<div contenteditable>drag<img src='../resources/abe.png' id=dragme>me<span id=target>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>");
20     setTimeout("step2()", 100);
21 }
22
23 function step2() {
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.");
26         return;
27     }
28     
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;
33     
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;
39     
40     eventSender.mouseMoveTo(x, y);
41     eventSender.mouseUp();
42
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>");
44
45     if (doc.getElementById("dragme").parentNode.tagName == "SPAN" && doc.getElementById("dragme").src.length > 10)
46         document.write("<p>SUCCESS</p>");
47     else
48         document.write("<p>FAILURE</p>");
49
50     testRunner.notifyDone();
51 }
52 </script>
53 </head>
54 <body onload="setTimeout('step1()', 100)">
55 <iframe src="about:blank"></iframe>
56 <ul id="console"></ul>
57 </body>
58 </html>