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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html

Issue 2852563002: Media Capabilities: stricter checks for the media configuration inputs. (Closed)
Patch Set: review comments and encoding tests Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media_capabilities/encodingInfo.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html
index a0e0d342682bca427fd2006e35dfd8c0cad40beb..85acfe7f613f70e68107ecba45a06260fe4c2fc2 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/media-capabilities/decodingInfo.html
@@ -35,6 +35,131 @@ promise_test(t => {
}));
}, "Test that decodingInfo rejects if the MediaConfiguration does not have a type");
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ }));
+}, "Test that decodingInfo rejects if the configuration doesn't have an audio or video field");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'video/webm; codecs="vp9"',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: -1,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration has a negative framerate");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'video/webm; codecs="vp9"',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 0,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration has a framerate set to 0");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'video/webm; codecs="vp9"',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: Infinity,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration has a framerate set to Infinity");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'fgeoa',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 24,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration contentType doesn't parse");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'audio/fgeoa',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 24,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration contentType isn't of type video");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'video/webm; codecs="vp9"; foo="bar"',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 24,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration contentType has more than one parameter");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ video: {
+ contentType: 'video/webm; foo="bar"',
+ width: 800,
+ height: 600,
+ bitrate: 3000,
+ framerate: 24,
+ },
+ }));
+}, "Test that decodingInfo rejects if the video configuration contentType has one parameter that isn't codecs");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ audio: { contentType: 'fgeoa' },
+ }));
+}, "Test that decodingInfo rejects if the audio configuration contenType doesn't parse");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ audio: { contentType: 'video/fgeoa' },
+ }));
+}, "Test that decodingInfo rejects if the audio configuration contentType isn't of type audio");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ audio: { contentType: 'audio/webm; codecs="opus"; foo="bar"' },
+ }));
+}, "Test that decodingInfo rejects if the audio configuration contentType has more than one parameters");
+
+promise_test(t => {
+ return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({
+ type: 'file',
+ audio: { contentType: 'audio/webm; foo="bar"' },
+ }));
+}, "Test that decodingInfo rejects if the audio configuration contentType has one parameter that isn't codecs");
+
promise_test(t => {
return navigator.mediaCapabilities.decodingInfo({
type: 'file',
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media_capabilities/encodingInfo.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698