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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.html

Issue 2685863004: Media Capabilities: stub implementation of mediaCapabilities.query(). (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Media Capabilities IDL tests</title>
6 <link rel="help" href="https://wicg.github.io/media-capabilities/"/>
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>Media Session IDL tests</h1>
14 <pre id='untested_idl' style='display:none'>
15 [PrimaryGlobal]
16 interface Window {
17 };
18 interface Worker {
19 };
20 interface Navigator {
21 };
22 interface WorkerNavigator {
23 };
24 </pre>
25 <pre id='idl'>
26 dictionary MediaConfiguration {
27 required MediaConfigurationType type;
28
29 VideoConfiguration video;
30 AudioConfiguration audio;
31 };
32
33 enum MediaConfigurationType {
34 "file",
35 "MediaSource",
36 };
37
38 dictionary VideoConfiguration {
39 required DOMString type;
40 required unsigned long width;
41 required unsigned long height;
42 required unsigned long bitrate;
43 required double framerate;
44 };
45
46 dictionary AudioConfiguration {
47 required DOMString type;
48 DOMString channels;
49 unsigned long bitrate;
50 unsigned long samplerate;
51 };
52
53 interface MediaDecodingAbility {
54 readonly attribute boolean supported;
55 readonly attribute boolean smooth;
56 readonly attribute boolean powerEfficient;
57 };
58
59 [Exposed=(Window)]
60 partial interface Navigator {
61 readonly attribute MediaCapabilities mediaCapabilities;
62 };
63
64 [Exposed=(Worker)]
65 partial interface WorkerNavigator {
66 readonly attribute MediaCapabilities mediaCapabilities;
67 };
68
69 [Exposed=(Window, Worker)]
70 interface MediaCapabilities {
71 Promise<MediaDecodingAbility> query(MediaConfiguration configuration);
72 };
73 </pre>
74 <script>
75 var idl_array = new IdlArray();
76 idl_array.add_untested_idls(document.getElementById("untested_idl").textContent) ;
77 idl_array.add_idls(document.getElementById("idl").textContent);
78 idl_array.add_objects({
79 Navigator: ["navigator"]
80 });
81 idl_array.test();
82 </script>
83 <div id="log"></div>
84 </body>
85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698