OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <body> |
| 4 <pre id='console'></pre> |
| 5 <script src="../resources/setup-for-read-common.js"></script> |
| 6 <script> |
| 7 var testConstructedFileList = [ |
| 8 { 'name': 'text-file', |
| 9 'contents': ['This is just', ' some text'], |
| 10 'type': 'text/plain' }, |
| 11 { 'name': 'empty-file', |
| 12 'contents': [], |
| 13 'type' : 'text/plain', |
| 14 'modified' : 20000}, |
| 15 { 'name': 'array-buffer', |
| 16 'contents': [(new Uint8Array([1,2,3,4,5])).buffer], |
| 17 'type' : 'application/octet-stream', |
| 18 'modified' : new Date("2010-01-01T12:13:24Z")}, |
| 19 ]; |
| 20 |
| 21 function startTest() |
| 22 { |
| 23 log('Reading the cloned contents of Files constructed programmatically.'); |
| 24 testFiles = testConstructedFileList.map(function(f) { |
| 25 return new File(f.contents, f.name, {type: f.type, lastModified: f.modif
ied || 0}); |
| 26 }); |
| 27 startWorker(testFiles, "resources/worker-read-file-constructor-async.js"); |
| 28 } |
| 29 |
| 30 if (window.testRunner) { |
| 31 testRunner.dumpAsText(); |
| 32 testRunner.waitUntilDone(); |
| 33 } |
| 34 startTest(); |
| 35 </script> |
| 36 </body> |
| 37 </html> |
OLD | NEW |