OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <input type="file" name="file" id="file" onchange="onInputFileChange()"> | 4 <input type="file" name="file" id="file" onchange="onInputFileChange()"> |
5 <pre id='console'></pre> | 5 <pre id='console'></pre> |
6 | 6 |
7 <script> | 7 <script> |
8 function log(message) | 8 function log(message) |
9 { | 9 { |
10 document.getElementById('console').appendChild(document.createTextNode(messa
ge + "\n")); | 10 document.getElementById('console').appendChild(document.createTextNode(messa
ge + "\n")); |
(...skipping 27 matching lines...) Expand all Loading... |
38 window.URL.revokeObjectURL(fileURL); | 38 window.URL.revokeObjectURL(fileURL); |
39 sendXMLHttpRequest("GET", fileURL); | 39 sendXMLHttpRequest("GET", fileURL); |
40 | 40 |
41 log("DONE"); | 41 log("DONE"); |
42 if (testRunner.notifyDone) | 42 if (testRunner.notifyDone) |
43 testRunner.notifyDone(); | 43 testRunner.notifyDone(); |
44 } | 44 } |
45 | 45 |
46 function runTests() | 46 function runTests() |
47 { | 47 { |
48 // Mouse events only work after an initial layout | |
49 document.body.offsetLeft; | |
50 eventSender.beginDragWithFiles(['resources/UTF8.txt']); | 48 eventSender.beginDragWithFiles(['resources/UTF8.txt']); |
51 eventSender.mouseMoveTo(10, 10); | 49 eventSender.mouseMoveTo(10, 10); |
52 eventSender.mouseUp(); | 50 eventSender.mouseUp(); |
53 } | 51 } |
54 | 52 |
55 if (window.eventSender) { | 53 if (window.eventSender) { |
56 testRunner.dumpAsText(); | 54 testRunner.dumpAsText(); |
57 testRunner.waitUntilDone(); | 55 testRunner.waitUntilDone(); |
58 window.onload = runTests; | 56 window.onload = runTests; |
59 } | 57 } |
60 </script> | 58 </script> |
61 </body> | 59 </body> |
62 </html> | 60 </html> |
OLD | NEW |