Index: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.html b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1fa20c6153d093cf7189605e7fb27e91075601cf |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/idlharness.html |
@@ -0,0 +1,85 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<meta charset="utf-8"> |
+<title>Media Capabilities IDL tests</title> |
+<link rel="help" href="https://wicg.github.io/media-capabilities/"/> |
+<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> |
+<h1>Media Session IDL tests</h1> |
+<pre id='untested_idl' style='display:none'> |
+[PrimaryGlobal] |
+interface Window { |
+}; |
+interface Worker { |
+}; |
+interface Navigator { |
+}; |
+interface WorkerNavigator { |
+}; |
+</pre> |
+<pre id='idl'> |
+dictionary MediaConfiguration { |
+ required MediaConfigurationType type; |
+ |
+ VideoConfiguration video; |
+ AudioConfiguration audio; |
+}; |
+ |
+enum MediaConfigurationType { |
+ "file", |
+ "MediaSource", |
+}; |
+ |
+dictionary VideoConfiguration { |
+ required DOMString type; |
+ required unsigned long width; |
+ required unsigned long height; |
+ required unsigned long bitrate; |
+ required double framerate; |
+}; |
+ |
+dictionary AudioConfiguration { |
+ required DOMString type; |
+ DOMString channels; |
+ unsigned long bitrate; |
+ unsigned long samplerate; |
+}; |
+ |
+interface MediaDecodingAbility { |
+ readonly attribute boolean supported; |
+ readonly attribute boolean smooth; |
+ readonly attribute boolean powerEfficient; |
+}; |
+ |
+[Exposed=(Window)] |
+partial interface Navigator { |
+ readonly attribute MediaCapabilities mediaCapabilities; |
+}; |
+ |
+[Exposed=(Worker)] |
+partial interface WorkerNavigator { |
+ readonly attribute MediaCapabilities mediaCapabilities; |
+}; |
+ |
+[Exposed=(Window, Worker)] |
+interface MediaCapabilities { |
+ Promise<MediaDecodingAbility> query(MediaConfiguration configuration); |
+}; |
+</pre> |
+<script> |
+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({ |
+ Navigator: ["navigator"] |
+}); |
+idl_array.test(); |
+</script> |
+<div id="log"></div> |
+</body> |
+</html> |