<!DOCTYPE html>
<html>
<body>
<input type=file id=file onchange='onInputFileChange()'>
<p id=status>To test manually, drag a directory to the file input above.</p>
<script>
var input = document.getElementsByTagName("input")[0];
var statusElement = document.getElementById("status");

function onInputFileChange()
{
    var file = document.getElementById('file').files[0];
    var reader = new FileReader();
    statusElement.textContent = "Starting test...";
    reader.readAsText(file);
    reader.onloadend = function() {
        statusElement.textContent = "PASS, no crash";
        if (window.testRunner)
            testRunner.notifyDone();
    }
}

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

eventSender.beginDragWithFiles(['resources']);
eventSender.mouseMoveTo(input.offsetLeft + 1, input.offsetTop + 1);
eventSender.mouseUp();

</script>
</body>
</html>
