Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta charset="utf-8"> | |
| 5 <title>Remote Playback API IDL tests</title> | |
| 6 <link rel="help" href="https://w3c.github.io/remoteplayback/"/> | |
| 7 <script src="/resources/testharness.js"></script> | |
| 8 <script src="/resources/testharnessreport.js"></script> | |
| 9 <script src="/resources/WebIDLParser.js"></script> | |
| 10 <script src="/resources/idlharness.js"></script> | |
| 11 </head> | |
| 12 <body> | |
| 13 <h1>Remote Playback API IDL tests</h1> | |
| 14 | |
| 15 <media id='media' width=10 height=10/> | |
| 16 | |
| 17 <pre id='untested_idl' style='display:none'> | |
| 18 interface HTMLMediaElement {}; | |
| 19 </pre> | |
| 20 | |
| 21 <pre id='idl'> | |
| 22 enum RemotePlaybackState { | |
|
foolip
2017/05/08 14:58:03
Recently, some IDL files were moved into interface
| |
| 23 "connecting", | |
| 24 "connected", | |
| 25 "disconnected" | |
| 26 }; | |
| 27 | |
| 28 callback RemotePlaybackAvailabilityCallback = void(boolean available); | |
| 29 | |
| 30 interface RemotePlayback : EventTarget { | |
| 31 readonly attribute RemotePlaybackState state; | |
| 32 attribute EventHandler onconnecting; | |
| 33 attribute EventHandler onconnect; | |
| 34 attribute EventHandler ondisconnect; | |
| 35 | |
| 36 Promise<long> watchAvailability(RemotePlaybackAvailabilityCallback callback) ; | |
| 37 Promise<void> cancelWatchAvailability(optional long id); | |
| 38 Promise<void> prompt(); | |
| 39 }; | |
| 40 | |
| 41 partial interface HTMLMediaElement { | |
| 42 readonly attribute RemotePlayback remote; | |
| 43 attribute boolean disableRemotePlayback; | |
| 44 }; | |
| 45 </pre> | |
| 46 <script> | |
| 47 var media = document.getElementById("media"); | |
| 48 var idl_array = new IdlArray(); | |
| 49 idl_array.add_untested_idls(document.getElementById("untested_idl").textContent) ; | |
| 50 idl_array.add_idls(document.getElementById("idl").textContent); | |
| 51 idl_array.add_objects({ | |
| 52 HTMLMediaElement: [media], | |
| 53 RemotePlayback: [media.remote] | |
| 54 }); | |
| 55 idl_array.test(); | |
| 56 </script> | |
| 57 <div id="log"></div> | |
| 58 </body> | |
| 59 </html> | |
| OLD | NEW |