Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drag-text-with-clear.html
blob2fd3274ab55a6b3421979550c4282bdcdf8c7f14
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();
12 document.getElementById("inputObject").ondragenter = function() {
13 document.getElementById("inputObject").value = "";
16 function dragText(src, dest)
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";
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>