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 <mlamouri@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716773}

--
set timeout to long

--

wpt-commits: 36691d0c57c84b80236ed53105ea15afaa7d88aa, 21423802c95e1b800b07e71c6f19a923f7d16616
wpt-pr: 18440
This commit is contained in:
Mounir Lamouri 2019-11-26 11:25:57 +00:00 коммит произвёл moz-wptsync-bot
Родитель 5e4e0ae62f
Коммит 14ba9c693b
2 изменённых файлов: 7 добавлений и 58 удалений

Просмотреть файл

@ -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',

Просмотреть файл

@ -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',