| Index: third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..95f60d7376024b031e3309aef560570a64999ca2
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/idlharness.html
|
| @@ -0,0 +1,99 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <meta charset=utf-8>
|
| + <title>Media Recorder IDL test</title>
|
| + <link rel="help" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html">
|
| + <link rel="idl" href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#idl-index">
|
| + <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>
|
| + <canvas id='canvas' width=10 height=10/>
|
| +
|
| + <pre id="untested_idl" style="display: none">
|
| + interface Event {};
|
| + interface EventHandler {};
|
| + interface EventTarget {};
|
| + interface MediaStream {};
|
| + </pre>
|
| + <pre id="idl" style="display: none">
|
| + // https://w3c.github.io/mediacapture-record/MediaRecorder.html
|
| +
|
| + [Constructor(MediaStream stream, optional MediaRecorderOptions options)]
|
| + interface MediaRecorder : EventTarget {
|
| + readonly attribute MediaStream stream;
|
| + readonly attribute DOMString mimeType;
|
| + readonly attribute RecordingState state;
|
| + attribute EventHandler onstart;
|
| + attribute EventHandler onstop;
|
| + attribute EventHandler ondataavailable;
|
| + attribute EventHandler onpause;
|
| + attribute EventHandler onresume;
|
| + attribute EventHandler onerror;
|
| + readonly attribute unsigned long videoBitsPerSecond;
|
| + readonly attribute unsigned long audioBitsPerSecond;
|
| +
|
| + void start(optional long timeslice);
|
| + void stop();
|
| + void pause();
|
| + void resume();
|
| + void requestData();
|
| +
|
| + static boolean isTypeSupported(DOMString type);
|
| + };
|
| +
|
| + dictionary MediaRecorderOptions {
|
| + DOMString mimeType;
|
| + unsigned long audioBitsPerSecond;
|
| + unsigned long videoBitsPerSecond;
|
| + unsigned long bitsPerSecond;
|
| + };
|
| +
|
| + enum RecordingState {
|
| + "inactive",
|
| + "recording",
|
| + "paused"
|
| + };
|
| +
|
| + [Constructor(DOMString type, BlobEventInit eventInitDict)]
|
| + interface BlobEvent : Event {
|
| + [SameObject] readonly attribute Blob data;
|
| + readonly attribute DOMHighResTimeStamp timecode;
|
| + };
|
| +
|
| + dictionary BlobEventInit {
|
| + required Blob data;
|
| + DOMHighResTimeStamp timecode;
|
| + };
|
| +
|
| + dictionary MediaRecorderErrorEventInit : EventInit {
|
| + required DOMException error;
|
| + };
|
| +
|
| + [Exposed=Window, Constructor(DOMString type, MediaRecorderErrorEventInit eventInitDict)]
|
| + interface MediaRecorderErrorEvent : Event {
|
| + [SameObject] readonly attribute DOMException error;
|
| + };
|
| +
|
| + </pre>
|
| + <script>
|
| + var canvas = document.getElementById('canvas');
|
| + var context = canvas.getContext("2d");
|
| + context.fillStyle = "red";
|
| + context.fillRect(0, 0, 10, 10);
|
| + var stream = canvas.captureStream();
|
| +
|
| + 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({
|
| + MediaRecorder: [new MediaRecorder(stream)],
|
| + });
|
| + idl_array.test();
|
| + </script>
|
| + <div id="log"></div>
|
| +</body>
|
| +</html>
|
|
|