<!DOCTYPE html>
<html>
<body onload="runTest()">
<script>
if (window.testRunner)
  testRunner.dumpAsText();
function runTest() {
  var draggedElement = document.getElementById('draggedElement');
  var x = draggedElement.offsetLeft + draggedElement.offsetWidth / 2;
  var y = draggedElement.offsetTop + draggedElement.offsetHeight / 2;

  eventSender.mouseMoveTo(x, y);
  eventSender.mouseDown();
  eventSender.mouseMoveTo(x + 100, y + 100);
  eventSender.mouseUp();
}
</script>
<div id="draggedElement" draggable="true">Drag</div>
<p>PASS if no leak is detected by the leak detector.</p>
</body>
</html>
