1 <!DOCTYPE html>
   2 <html>
   3 <body>
   4 <input type=file id=file onchange='onInputFileChange()'>
   5 <p id=status>To test manually, drag a file to the file input above or click on Input button and select any file</p>
   6 <script>
   7 var input = document.getElementsByTagName("input")[0];
   8 var statusElement = document.getElementById("status");
   9 
  10 function onInputFileChange()
  11 {
  12     var file = document.getElementById('file').files[0];
  13     var reader = new FileReader();
  14     statusElement.textContent = "Starting test...";
  15     reader.readAsText(file);
  16     reader.onloadend = function() {
  17         statusElement.textContent = "PASS, no crash";
  18     }
  19 }
  20 eventSender.beginDragWithFiles(['resources']);
  21 eventSender.mouseMoveTo(input.offsetLeft + 1, input.offsetTop + 1);
  22 eventSender.mouseUp();
  23 </script>
  24 </body>
  25 </html>
  26