OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8"> |
| 5 <title>File API automated IDL tests</title> |
| 6 <link rel="author" title="Intel" href="http://www.intel.com"> |
| 7 <link rel="help" href="http://dev.w3.org/2006/webapi/FileAPI/#conformance"> |
| 8 <script src="../../../resources/testharness.js"></script> |
| 9 <script src="../../../resources/testharnessreport.js"></script> |
| 10 <script src="../../../resources/WebIDLParser.js"></script> |
| 11 <script src="../../../resources/idlharness.js"></script> |
| 12 </head> |
| 13 <body> |
| 14 <h1>File API automated IDL tests</h1> |
| 15 |
| 16 <div id="log"></div> |
| 17 |
| 18 <form name="uploadData"> |
| 19 <input type="file" id="fileChooser"> |
| 20 </form> |
| 21 |
| 22 <script> |
| 23 var file_input; |
| 24 setup(function() { |
| 25 var idl_array = new IdlArray(); |
| 26 |
| 27 var request = new XMLHttpRequest(); |
| 28 request.open("GET", "idlharness.idl"); |
| 29 request.send(); |
| 30 request.onload = function() { |
| 31 var idls = request.responseText; |
| 32 |
| 33 idl_array.add_untested_idls("[PrimaryGlobal] interface Window { };"); |
| 34 |
| 35 idl_array.add_untested_idls("interface ArrayBuffer {};"); |
| 36 idl_array.add_untested_idls("interface ArrayBufferView {};"); |
| 37 idl_array.add_untested_idls("interface URL {};"); |
| 38 idl_array.add_untested_idls("interface EventTarget {};"); |
| 39 idl_array.add_untested_idls("interface Event {};"); |
| 40 idl_array.add_untested_idls("[TreatNonCallableAsNull] callback EventHand
lerNonNull = any (Event event);"); |
| 41 idl_array.add_untested_idls("typedef EventHandlerNonNull? EventHandler;"
); |
| 42 |
| 43 idl_array.add_idls(idls); |
| 44 |
| 45 file_input = document.querySelector("#fileChooser"); |
| 46 idl_array.add_objects({ |
| 47 Blob: ['new Blob(["TEST"])'], |
| 48 File: ['new File(["myFileBits"], "myFileName")'], |
| 49 FileList: ['file_input.files'], |
| 50 FileReader: ['new FileReader()'] |
| 51 }); |
| 52 |
| 53 idl_array.test(); |
| 54 done(); |
| 55 }; |
| 56 }, {explicit_done: true}); |
| 57 </script> |
| 58 |
| 59 </body> |
| 60 </html> |
OLD | NEW |