Revision ec54ac4479d66e039809ac65026a12eb9529d34a authored by Geoffrey Sneddon on 13 March 2018, 15:16:44 UTC, committed by Geoffrey Sneddon on 14 March 2018, 18:08:06 UTC
1 parent 24da741
idlharness.html
<!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'>
[Global=Window, Exposed=Window]
interface Window {
};
interface Worker {
};
interface Navigator {
};
interface WorkerNavigator {
};
</pre>
<pre id='idl'>
dictionary MediaConfiguration {
VideoConfiguration video;
AudioConfiguration audio;
};
dictionary MediaDecodingConfiguration : MediaConfiguration {
required MediaDecodingType type;
};
dictionary MediaEncodingConfiguration : MediaConfiguration {
required MediaEncodingType type;
};
enum MediaDecodingType {
"file",
"media-source",
};
dictionary VideoConfiguration {
required DOMString contentType;
required unsigned long width;
required unsigned long height;
required unsigned long bitrate;
required double framerate;
};
dictionary AudioConfiguration {
required DOMString contentType;
DOMString channels;
unsigned long bitrate;
unsigned long samplerate;
};
interface MediaCapabilitiesInfo {
readonly attribute boolean supported;
readonly attribute boolean smooth;
readonly attribute boolean powerEfficient;
};
[Exposed=(Window)]
partial interface Navigator {
[SameObject] readonly attribute MediaCapabilities mediaCapabilities;
};
[Exposed=(Worker)]
partial interface WorkerNavigator {
[SameObject] readonly attribute MediaCapabilities mediaCapabilities;
};
[Exposed=(Window, Worker)]
interface MediaCapabilities {
Promise<MediaCapabilitiesInfo> decodingInfo(MediaDecodingConfiguration configuration);
Promise<MediaCapabilitiesInfo> encodingInfo(MediaEncodingConfiguration 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>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...