Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta charset=utf-8> | |
| 5 <title>Media Capture from DOM Elements IDL test</title> | |
| 6 <link rel="help" href="https://w3c.github.io/mediacapture-fromelement/"> | |
| 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 <video id='video' width=10 height=10/> | |
| 14 <canvas id='canvas' width=10 height=10/> | |
| 15 | |
| 16 <pre id="untested_idl" style="display: none"> | |
| 17 interface HTMLCanvasElement {}; | |
| 18 interface HTMLMediaElement {}; | |
| 19 interface MediaStreamTrack {}; | |
| 20 </pre> | |
| 21 <pre id="idl" style="display: none"> | |
| 22 // https://w3c.github.io/mediacapture-fromelement/ | |
| 23 | |
| 24 partial interface HTMLMediaElement { | |
| 25 MediaStream captureStream(); | |
| 26 }; | |
| 27 | |
| 28 partial interface HTMLCanvasElement { | |
| 29 MediaStream captureStream(optional double frameRequestRate); | |
| 30 }; | |
| 31 | |
| 32 interface CanvasCaptureMediaStreamTrack : MediaStreamTrack { | |
| 33 readonly attribute HTMLCanvasElement canvas; | |
| 34 void requestFrame(); | |
| 35 }; | |
| 36 | |
| 37 </pre> | |
| 38 <script> | |
| 39 var canvas = document.getElementById('canvas'); | |
| 40 var video = document.getElementById('video'); | |
| 41 | |
| 42 var idl_array = new IdlArray(); | |
| 43 idl_array.add_untested_idls(document.getElementById("untested_idl").textCont ent); | |
| 44 idl_array.add_idls(document.getElementById("idl").textContent); | |
| 45 idl_array.add_objects({ | |
| 46 Canvas: [canvas.captureStream()], | |
| 47 Media: [video.captureStream()], | |
|
Reilly Grant (use Gerrit)
2017/03/20 16:56:40
These should be "HTMLCanvasElement" and "HTMLMedia
mcasas
2017/03/20 17:00:24
This idl harness tests 3 partial interfaces which
Reilly Grant (use Gerrit)
2017/03/20 17:05:39
I didn't read this closely enough but there is sti
mcasas
2017/03/20 17:54:50
OIC, so here I have to create objects of the parti
| |
| 48 }); | |
| 49 idl_array.test(); | |
| 50 </script> | |
| 51 <div id="log"></div> | |
| 52 </body> | |
| 53 </html> | |
| OLD | NEW |