blob: 1b47b97edfe83aa4ed39f1a11a58471d6bcd7fa8 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style> * { margin: 0px; padding: 0px; } </style>
<script>
function log(msg)
{
document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
}
function test()
{
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
testDragAndMove();
} else
log("testRunner is not available");
}
function testDragAndMove()
{
var draggable = document.getElementById("draggableForDiv");
var startX = draggable.offsetLeft + 5;
var startY = draggable.offsetTop + 5;
eventSender.dragMode = false;
// Grab the draggable node
eventSender.mouseMoveTo(startX,startY);
eventSender.mouseDown();
// Then drag it. OK not to crash.
eventSender.mouseMoveTo(startX + 10, startY + 10);
eventSender.mouseMoveTo(startX + 20, startY + 20);
eventSender.mouseUp();
document.getElementById("test").style.display = "none";
log("PASS");
testRunner.notifyDone();
}
</script>
</head>
<body onload="test()">
<div id="test">
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=41695">Bug 41695</a>. It is OK not to crash</p>
<b draggable="true" id="draggableForDiv">dragme</b>
</div>
<pre id="console"></pre>
</body>
</html>