[LFC][IFC] Make InlineTextItem reusable when 'segment break' behavior changes
[WebKit-https.git] / LayoutTests / fast / events / drag-text-with-clear.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p> This tests that if text field is cleared while drag - drop it does not give any Asserts <a href=https://bugs.webkit.org/show_bug.cgi?id=61008>(Bug 61008)</a></p>
5 <div id="result"></div>
6 <input type="text" id="inputObject" value="test">
7 <input type="text" id="outputObject">
8 <script>
9 if (window.testRunner)
10     testRunner.dumpAsText();
11
12 document.getElementById("inputObject").ondragenter = function() {
13     document.getElementById("inputObject").value = "";
14 }
15
16 function dragText(src, dest)
17 {
18     eventSender.mouseMoveTo(src.offsetLeft + 5, src.offsetTop + 2);
19     eventSender.mouseDown();
20     eventSender.mouseMoveTo(src.offsetLeft + 10, src.offsetTop + 2);
21     eventSender.mouseMoveTo(dest.offsetLeft + 5, dest.offsetTop + 2);
22     eventSender.mouseUp();
23     document.getElementById("result").innerHTML = "PASS";
24 }
25
26 var inputObject = document.getElementById("inputObject");
27 var outputObject = document.getElementById("outputObject");
28 inputObject.focus();
29 dragText(inputObject, outputObject);
30 </script>
31 </body>
32 </html>