Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html |
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..974ae36ec3882e7b8e8fd201faec0fd4c8cbf74f |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html |
| @@ -0,0 +1,53 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <meta charset=utf-8> |
| + <title>Media Capture from DOM Elements IDL test</title> |
| + <link rel="help" href="https://w3c.github.io/mediacapture-fromelement/"> |
| + <script src="/resources/testharness.js"></script> |
| + <script src="/resources/testharnessreport.js"></script> |
| + <script src="/resources/WebIDLParser.js"></script> |
| + <script src="/resources/idlharness.js"></script> |
| +</head> |
| +<body> |
| + <video id='video' width=10 height=10/> |
| + <canvas id='canvas' width=10 height=10/> |
| + |
| + <pre id="untested_idl" style="display: none"> |
| + interface HTMLCanvasElement {}; |
| + interface HTMLMediaElement {}; |
| + interface MediaStreamTrack {}; |
| + </pre> |
| + <pre id="idl" style="display: none"> |
| + // https://w3c.github.io/mediacapture-fromelement/ |
| + |
| + partial interface HTMLMediaElement { |
| + MediaStream captureStream(); |
| + }; |
| + |
| + partial interface HTMLCanvasElement { |
| + MediaStream captureStream(optional double frameRequestRate); |
| + }; |
| + |
| + interface CanvasCaptureMediaStreamTrack : MediaStreamTrack { |
| + readonly attribute HTMLCanvasElement canvas; |
| + void requestFrame(); |
| + }; |
| + |
| + </pre> |
| + <script> |
| + var canvas = document.getElementById('canvas'); |
| + var video = document.getElementById('video'); |
| + |
| + var idl_array = new IdlArray(); |
| + idl_array.add_untested_idls(document.getElementById("untested_idl").textContent); |
| + idl_array.add_idls(document.getElementById("idl").textContent); |
| + idl_array.add_objects({ |
| + Canvas: [canvas.captureStream()], |
| + 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
|
| + }); |
| + idl_array.test(); |
| + </script> |
| + <div id="log"></div> |
| +</body> |
| +</html> |