Added: trunk/LayoutTests/platform/gtk/media/mediacapabilities/mediacapabilities-types-expected.txt (0 => 246109)
--- trunk/LayoutTests/platform/gtk/media/mediacapabilities/mediacapabilities-types-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/media/mediacapabilities/mediacapabilities-types-expected.txt 2019-06-05 16:56:57 UTC (rev 246109)
@@ -0,0 +1,87 @@
+Test basic dictionary and enum types of Media Capabilities API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file' });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'media-source' });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { } });
+ } rejected promise with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { } });
+ } rejected promise with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+ } rejected promise with TypeError: The provided value is non-finite.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'file', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/0" } });
+ } rejected promise with TypeError: The provided value is non-finite.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+FAIL () => {
+ return navigator.mediaCapabilities.encodingInfo({ type: 'record' });
+ } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record' })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+FAIL () => {
+ return navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } });
+ } should not throw exception. Threw exception TypeError: navigator.mediaCapabilities.encodingInfo is not a function. (In 'navigator.mediaCapabilities.encodingInfo({ type: 'record', audio: { } })', 'navigator.mediaCapabilities.encodingInfo' is undefined).
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { } });
+ } rejected promise with TypeError: Member AudioConfiguration.contentType is required and must be an instance of DOMString.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', audio: { contentType: 'video/mp4; codecs="avc1"' } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { } });
+ } rejected promise with TypeError: Member VideoConfiguration.bitrate is required and must be an instance of unsigned long long.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'audio/mp3', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Member VideoConfiguration.width is required and must be an instance of unsigned long.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1,vp9"', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4', width:640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 0 } });
+ } rejected promise with TypeError: Type error.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/a" } });
+ } rejected promise with TypeError: The provided value is non-finite.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'record', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: "24/-1" } });
+ } rejected promise with TypeError: The provided value is non-finite.
+PASS () => {
+ return navigator.mediaCapabilities.decodingInfo({ type: 'invalid', video: { contentType: 'video/mp4; codecs="avc1"', width: 640, height: 480, bitrate: 1000, framerate: 24 } });
+ } rejected promise with TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+