Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html

Issue 2755293002: Capture from DOM elements: WPT idl tests (Closed)
Patch Set: reillyg@ comments: corrected object creation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1dad5c4c2eccf7594a7d74894a56e44fb7adb31f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html
@@ -0,0 +1,55 @@
+<!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>
+ <media id='media' width=10 height=10/>
+ <canvas id='canvas' width=10 height=10/>
+
+ <pre id="untested_idl" style="display: none">
+ interface HTMLCanvasElement {};
+ interface HTMLMediaElement {};
+ interface MediaStream {};
+ 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 media = document.getElementById('media');
+
+ 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({
+ HTMLMediaElement: [media],
+ HTMLCanvasElement: [canvas],
+ CanvasCaptureMediaStreamTrack: [canvas.captureStream().getTracks()[0]],
Reilly Grant (use Gerrit) 2017/03/20 18:03:31 If you want to test the capture streams generated
mcasas 2017/03/20 18:17:55 I could but since we're ignoring (l.19) the testin
+ });
+ idl_array.test();
+ </script>
+ <div id="log"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698