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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/query.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/query.html b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/query.html
new file mode 100644
index 0000000000000000000000000000000000000000..809fbc66ec5c46b69d6bd656c6860a6dcc0de99d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/query.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>MediaCapabilities.query()</title>
+<script src=/resources/testharness.js></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.query());
+}, "Test that query rejects if it doesn't get a configuration");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.query({}));
+}, "Test that query rejects if the MediaConfiguration isn't valid");
+
+promise_test(t => {
+ return navigator.mediaCapabilities.query({
+ type: 'file',
+ video: {
+ type: 'video/webm',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 24,
+ },
+ audio: {
+ type: 'audio/webm',
+ },
+ }).then(ability => {
+ assert_idl_attribute(ability, 'supported');
+ assert_idl_attribute(ability, 'smooth');
+ assert_idl_attribute(ability, 'powerEfficient');
+ });
+}, "Test that query returns a valid MediaDecodingAbility objects");
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698