From 14ba9c693befe2a8f9258896daf270a1391d7d32 Mon Sep 17 00:00:00 2001 From: Mounir Lamouri Date: Tue, 26 Nov 2019 11:25:57 +0000 Subject: [PATCH] Bug 1574020 [wpt PR 18440] - Media Capabilities: make framerate a double instead of a DOMString., a=testonly Automatic update from web-platform-tests Media Capabilities: make framerate a double instead of a DOMString. Spec change: https://github.com/w3c/media-capabilities/pull/128 Bug: 994017 Change-Id: Iab036264fe19a6676c97bb12648321408d91f283 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1755046 Commit-Queue: Mounir Lamouri Reviewed-by: Steven Holte Reviewed-by: Chrome Cunningham Cr-Commit-Position: refs/heads/master@{#716773} -- set timeout to long -- wpt-commits: 36691d0c57c84b80236ed53105ea15afaa7d88aa, 21423802c95e1b800b07e71c6f19a923f7d16616 wpt-pr: 18440 --- .../media-capabilities/decodingInfo.any.js | 33 +++---------------- .../media-capabilities/encodingInfo.html | 32 ++---------------- 2 files changed, 7 insertions(+), 58 deletions(-) diff --git a/testing/web-platform/tests/media-capabilities/decodingInfo.any.js b/testing/web-platform/tests/media-capabilities/decodingInfo.any.js index edd58ac3409b..67b90d9db652 100644 --- a/testing/web-platform/tests/media-capabilities/decodingInfo.any.js +++ b/testing/web-platform/tests/media-capabilities/decodingInfo.any.js @@ -1,3 +1,4 @@ +// META: timeout=long 'use strict'; // Minimal VideoConfiguration that will be allowed per spec. All optional @@ -129,7 +130,7 @@ promise_test(t => { }, "Test that decodingInfo rejects if the video configuration contentType has one parameter that isn't codecs"); promise_test(t => { - return navigator.mediaCapabilities.decodingInfo({ + return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/webm; codecs="vp09.00.10.08"', @@ -138,8 +139,8 @@ promise_test(t => { bitrate: 3000, framerate: '24000/1001', } - }); -}, "Test that decodingInfo() accepts framerate in the form of x/y"); + })); +}, "Test that decodingInfo() rejects framerate in the form of x/y"); promise_test(t => { return promise_rejects_js(t, TypeError, navigator.mediaCapabilities.decodingInfo({ @@ -206,32 +207,6 @@ promise_test(t => { })); }, "Test that decodingInfo() rejects framerate in the form of x/"); -promise_test(t => { - return navigator.mediaCapabilities.decodingInfo({ - type: 'file', - video: { - contentType: 'video/webm; codecs="vp09.00.10.08"', - width: 800, - height: 600, - bitrate: 3000, - framerate: '24000/1e4', - } - }); -}, "Test that decodingInfo() accepts framerate with 'e'"); - -promise_test(t => { - return navigator.mediaCapabilities.decodingInfo({ - type: 'file', - video: { - contentType: 'video/webm; codecs="vp09.00.10.08"', - width: 800, - height: 600, - bitrate: 3000, - framerate: '24/1.0001', - } - }); -}, "Test that decodingInfo() accepts framerate as fraction with decimals"); - promise_test(t => { return promise_rejects_js(t, TypeError, navigator.mediaCapabilities.decodingInfo({ type: 'file', diff --git a/testing/web-platform/tests/media-capabilities/encodingInfo.html b/testing/web-platform/tests/media-capabilities/encodingInfo.html index 08a3f7569a18..4c0f3abd671e 100644 --- a/testing/web-platform/tests/media-capabilities/encodingInfo.html +++ b/testing/web-platform/tests/media-capabilities/encodingInfo.html @@ -133,7 +133,7 @@ promise_test(t => { }, "Test that encodingInfo rejects if the video configuration contentType has one parameter that isn't codecs"); promise_test(t => { - return navigator.mediaCapabilities.encodingInfo({ + return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.encodingInfo({ type: 'record', video: { contentType: 'video/webm; codecs="vp09.00.10.08"', @@ -142,8 +142,8 @@ promise_test(t => { bitrate: 3000, framerate: '24000/1001', } - }); -}, "Test that encodingInfo() accepts framerate in the form of x/y"); + })); +}, "Test that encodingInfo() rejects framerate in the form of x/y"); promise_test(t => { return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.encodingInfo({ @@ -210,32 +210,6 @@ promise_test(t => { })); }, "Test that encodingInfo() rejects framerate in the form of x/"); -promise_test(t => { - return navigator.mediaCapabilities.encodingInfo({ - type: 'record', - video: { - contentType: 'video/webm; codecs="vp09.00.10.08"', - width: 800, - height: 600, - bitrate: 3000, - framerate: '24000/1e4', - } - }); -}, "Test that encodingInfo() accepts framerate with 'e'"); - -promise_test(t => { - return navigator.mediaCapabilities.encodingInfo({ - type: 'record', - video: { - contentType: 'video/webm; codecs="vp09.00.10.08"', - width: 800, - height: 600, - bitrate: 3000, - framerate: '24/1.0001', - } - }); -}, "Test that encodingInfo() accepts framerate as fraction with decimals"); - promise_test(t => { return promise_rejects(t, new TypeError(), navigator.mediaCapabilities.encodingInfo({ type: 'record',