Change log level: info -> debug
[framework/web/webkit-efl.git] / LayoutTests / editing / pasteboard / drop-text-without-selection.html
1 <script>
2 if (window.testRunner)
3      testRunner.dumpEditingCallbacks();
4 </script>
5 <body onload="runTest()">
6 <p>
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>.
9 </p>
10 <p>
11     The text field should accept drag-and-dropped text, such as the link, even if
12     no text is currently selected.
13 </p>
14 <hr>
15 <input id="field">
16 <a id="link" href="http://www.ibm.com/">drop me into the text field</a>
17
18 <script>
19
20 function runTest() {
21     if (!window.testRunner)
22         return;
23
24     window.testRunner.waitUntilDone();
25
26     var link = document.getElementById("link");
27
28     var x = link.offsetLeft + link.offsetWidth / 2;
29     var y = link.offsetTop + link.offsetHeight / 2;
30
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");
36     
37     x = field.offsetLeft + field.offsetWidth / 2;
38     y = field.offsetTop + field.offsetHeight / 2;
39
40     eventSender.mouseMoveTo(x, y);
41     eventSender.mouseUp();
42
43     window.testRunner.notifyDone();
44 }
45
46 </script>
47
48 </body>