blob: 2fd3274ab55a6b3421979550c4282bdcdf8c7f14 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<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>
<div id="result"></div>
<input type="text" id="inputObject" value="test">
<input type="text" id="outputObject">
<script>
if (window.testRunner)
testRunner.dumpAsText();
document.getElementById("inputObject").ondragenter = function() {
document.getElementById("inputObject").value = "";
}
function dragText(src, dest)
{
eventSender.mouseMoveTo(src.offsetLeft + 5, src.offsetTop + 2);
eventSender.mouseDown();
eventSender.mouseMoveTo(src.offsetLeft + 10, src.offsetTop + 2);
eventSender.mouseMoveTo(dest.offsetLeft + 5, dest.offsetTop + 2);
eventSender.mouseUp();
document.getElementById("result").innerHTML = "PASS";
}
var inputObject = document.getElementById("inputObject");
var outputObject = document.getElementById("outputObject");
inputObject.focus();
dragText(inputObject, outputObject);
</script>
</body>
</html>