OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title>High Resolution Time IDL tests</title> | 5 <title>High Resolution Time IDL tests</title> |
6 <link rel="author" title="W3C" href="http://www.w3.org/" /> | 6 <link rel="author" title="W3C" href="http://www.w3.org/" /> |
7 <link rel="help" href="http://www.w3.org/TR/hr-time/#sec-extenstions-performance
-interface"/> | 7 <link rel="help" href="http://www.w3.org/TR/hr-time/#sec-extenstions-performance
-interface"/> |
8 <script src="/resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
9 <script src="/resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
10 <script src="/resources/WebIDLParser.js"></script> | 10 <script src="/resources/WebIDLParser.js"></script> |
11 <script src="/resources/idlharness.js"></script> | 11 <script src="/resources/idlharness.js"></script> |
12 </head> | 12 </head> |
13 <body> | 13 <body> |
14 <h1>High Resolution Time IDL tests</h1> | 14 <h1>High Resolution Time IDL tests</h1> |
15 <div id="log"></div> | 15 <div id="log"></div> |
16 | 16 |
17 <pre id='untested_idl' style='display:none'> | 17 <pre id='untested_idl' style='display:none'> |
18 | 18 |
19 interface Window { | 19 interface Window { |
20 }; | 20 }; |
21 | 21 |
22 interface Performance { | 22 [Exposed=Worker] |
| 23 interface WorkerGlobalScope { |
23 }; | 24 }; |
24 | 25 |
25 partial interface Window { | |
26 [Replaceable] readonly attribute Performance performance; | |
27 }; | |
28 </pre> | 26 </pre> |
29 | 27 |
30 <pre id='idl'> | 28 <pre id='idl'> |
31 typedef double DOMHighResTimeStamp; | 29 typedef double DOMHighResTimeStamp; |
32 | 30 |
33 partial interface Performance { | 31 [Exposed=(Window,Worker)] |
34 DOMHighResTimeStamp now(); | 32 interface Performance : EventTarget { |
| 33 DOMHighResTimeStamp now(); |
| 34 serializer = {attribute}; |
35 }; | 35 }; |
| 36 |
| 37 [NoInterfaceObject, |
| 38 Exposed=(Window,Worker)] |
| 39 interface GlobalPerformance { |
| 40 [Replaceable] |
| 41 readonly attribute Performance performance; |
| 42 }; |
| 43 |
| 44 Window implements GlobalPerformance; |
| 45 |
| 46 WorkerGlobalScope implements GlobalPerformance; |
36 </pre> | 47 </pre> |
37 | 48 |
38 <script> | 49 <script> |
39 | 50 |
40 (function() { | 51 (function() { |
41 var idl_array = new IdlArray(); | 52 var idl_array = new IdlArray(); |
42 | 53 |
43 idl_array.add_untested_idls(document.getElementById("untested_idl").textConten
t); | 54 idl_array.add_untested_idls(document.getElementById("untested_idl").textConten
t); |
44 idl_array.add_idls(document.getElementById("idl").textContent); | 55 idl_array.add_idls(document.getElementById("idl").textContent); |
45 | 56 |
46 idl_array.add_objects({Performance: ["window.performance"]}); | 57 idl_array.add_objects({Performance: ["window.performance"]}); |
47 | 58 |
48 idl_array.test(); | 59 idl_array.test(); |
49 })(); | 60 })(); |
50 | 61 |
51 </script> | 62 </script> |
52 </body> | 63 </body> |
53 </html> | 64 </html> |
OLD | NEW |