4 <script> /* This script will be executed in a subframe. */
7 eventSender
.beginDragWithFiles(['resources/UTF8.txt']);
8 eventSender
.mouseMoveTo(20, 20);
12 function onInputFileChange()
14 var file
= document
.getElementById('file').files
[0];
15 var reader
= new FileReader();
16 reader
.readAsText(file
);
17 console
.log('Started reading...');
19 top
.location
= 'data:text/html,<p>PASS if no crash.</p><script>testRunner.notifyDone()</scr' + 'ipt>';
24 if (window
.eventSender
) {
25 testRunner
.dumpAsText();
26 testRunner
.waitUntilDone();
28 document
.write('<iframe src="data:text/html,<input type=file id=file onchange=\'onInputFileChange()\'><script>' + document
.getElementsByTagName("script")[0].innerText
+ 'runTest()</scr' + 'ipt>" style="left:0px;top:0px"></iframe>');
31 <p>Test that using FileReader from a document with unique origin doesn't cause a crash.
</p>
32 <p>If testing manually, please drop a file on an input above.
</p>