| <!DOCTYPE html> |
| <html> |
| <script src="../../resources/ui-helper.js"></script> |
| <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(); |
| } |
| |
| testRunner.setOpenPanelFiles(['resources']); |
| UIHelper.activateAt(input.offsetLeft + 1, input.offsetTop + 1); |
| |
| </script> |
| </body> |
| </html> |