| Joshua Bell | 3f00176 | 2017-10-05 03:33:01 | [diff] [blame^] | 1 | <!DOCTYPE html> |
| 2 | <meta charset=utf-8> |
| 3 | <title>Entries API: IDL Tests</title> |
| 4 | <link rel=help href="https://wicg.github.io/entries-api/#idl-index"> |
| 5 | <script src="/resources/testharness.js"></script> |
| 6 | <script src="/resources/testharnessreport.js"></script> |
| 7 | <script src="/resources/WebIDLParser.js"></script> |
| 8 | <script src="/resources/idlharness.js"></script> |
| 9 | <script> |
| 10 | 'use strict'; |
| 11 | |
| 12 | promise_test(t => { |
| 13 | return fetch('interfaces.idl') |
| 14 | .then(r => r.text()) |
| 15 | .then(idls => { |
| 16 | |
| 17 | var idl_array = new IdlArray(); |
| 18 | |
| 19 | // https://w3c.github.io/FileAPI/#dfn-file |
| 20 | idl_array.add_untested_idls('[Exposed=(Window,Worker)] interface File {};'); |
| 21 | |
| 22 | // https://html.spec.whatwg.org/multipage/forms.html#htmlinputelement |
| 23 | idl_array.add_untested_idls('interface HTMLInputElement {};'); |
| 24 | |
| 25 | // https://html.spec.whatwg.org/multipage/interaction.html#datatransferitem |
| 26 | idl_array.add_untested_idls('interface DataTransferItem {};'); |
| 27 | |
| 28 | idl_array.add_idls(idls); |
| 29 | |
| 30 | idl_array.add_objects({ |
| 31 | File: ['new File([], "example.txt")'], |
| 32 | HTMLInputElement: ['document.createElement("input")'], |
| 33 | }); |
| 34 | |
| 35 | idl_array.test(); |
| 36 | }); |
| 37 | |
| 38 | }, 'Entries API: IDL'); |
| 39 | </script> |