Andrew Top | 61a8495 | 2019-04-30 15:07:33 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>User Timing IDL tests</title> |
| 6 | <link rel="author" title="W3C" href="http://www.w3.org/" /> |
| 7 | <link rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/> |
| 8 | <link rel="help" href="http://www.w3.org/TR/user-timing/#performancemark"/> |
| 9 | <link rel="help" href="http://www.w3.org/TR/user-timing/#performancemeasure"/> |
| 10 | <script src="/resources/testharness.js"></script> |
| 11 | <script src="/resources/testharnessreport.js"></script> |
| 12 | <script src="/resources/WebIDLParser.js"></script> |
| 13 | <script src="/resources/idlharness.js"></script> |
| 14 | </head> |
| 15 | <body> |
| 16 | <h1>User Timing IDL tests</h1> |
| 17 | <div id="log"></div> |
| 18 | |
| 19 | <pre id='untested_idl' style='display:none'> |
| 20 | interface Performance { |
| 21 | }; |
| 22 | |
| 23 | interface PerformanceEntry { |
| 24 | }; |
| 25 | </pre> |
| 26 | |
| 27 | <pre id='idl'> |
| 28 | partial interface Performance { |
| 29 | void mark(DOMString markName); |
| 30 | void clearMarks(optional DOMString markName); |
| 31 | |
| 32 | void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark); |
| 33 | void clearMeasures(optional DOMString measureName); |
| 34 | }; |
| 35 | |
| 36 | interface PerformanceMark : PerformanceEntry { |
| 37 | }; |
| 38 | |
| 39 | interface PerformanceMeasure : PerformanceEntry { |
| 40 | }; |
| 41 | |
| 42 | </pre> |
| 43 | |
| 44 | <script> |
| 45 | |
| 46 | (function() { |
| 47 | var idl_array = new IdlArray(); |
| 48 | |
| 49 | idl_array.add_untested_idls(document.getElementById("untested_idl").textContent); |
| 50 | idl_array.add_idls(document.getElementById("idl").textContent); |
| 51 | |
| 52 | idl_array.add_objects({Performance: ["window.performance"]}); |
| 53 | |
| 54 | idl_array.test(); |
| 55 | })(); |
| 56 | |
| 57 | </script> |
| 58 | </body> |
| 59 | </html> |