OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>Clipboard IDL test</title> |
| 4 <link rel="help" href="https://w3c.github.io/clipboard-apis/"> |
| 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 function doTest(idls) { |
| 13 var idl_array = new IdlArray(); |
| 14 idl_array.add_untested_idls('interface Navigator {};'); |
| 15 idl_array.add_untested_idls('interface EventTarget {};'); |
| 16 for (let idl of idls) { |
| 17 idl_array.add_idls(idl); |
| 18 } |
| 19 idl_array.add_objects({ |
| 20 Navigator: ['navigator'], |
| 21 Clipboard: ['navigator.clipboard'], |
| 22 }); |
| 23 idl_array.test(); |
| 24 }; |
| 25 |
| 26 function fetchText(url) { |
| 27 return fetch(url).then((response) => response.text()); |
| 28 } |
| 29 |
| 30 promise_test(() => { |
| 31 return Promise.all(["/interfaces/clipboard.idl"].map(fetchText)) |
| 32 .then(doTest); |
| 33 }, "Test driver"); |
| 34 </script> |
OLD | NEW |