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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/query.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 <title>MediaCapabilities.query()</title>
3 <script src=/resources/testharness.js></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script>
6
7 promise_test(t => {
8 return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.query() );
9 }, "Test that query rejects if it doesn't get a configuration");
10
11 promise_test(t => {
12 return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.query({ }));
13 }, "Test that query rejects if the MediaConfiguration isn't valid");
14
15 promise_test(t => {
16 return navigator.mediaCapabilities.query({
17 type: 'file',
18 video: {
19 type: 'video/webm',
20 width: 800,
21 height: 600,
22 bitrate: 3000,
23 framerate: 24,
24 },
25 audio: {
26 type: 'audio/webm',
27 },
28 }).then(ability => {
29 assert_idl_attribute(ability, 'supported');
30 assert_idl_attribute(ability, 'smooth');
31 assert_idl_attribute(ability, 'powerEfficient');
32 });
33 }, "Test that query returns a valid MediaDecodingAbility objects");
34
35 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698