WebKit Bugzilla
Attachment 368712 Details for
Bug 197476
: Hide MediaCapabilities.encodingInfo() when the platform does not support it.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197476-20190501143132.patch (text/plain), 21.97 KB, created by
Jer Noble
on 2019-05-01 14:31:33 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2019-05-01 14:31:33 PDT
Size:
21.97 KB
patch
obsolete
>Subversion Revision: 244840 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 7cff018f738c1f01a5a35964a7ba656cd4cdf530..da6bd98068f138874aae096f3d2ee4047b7677b5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2019-05-01 Jer Noble <jer.noble@apple.com> >+ >+ Hide MediaCapabilities.encodingInfo() when the platform does not support it. >+ https://bugs.webkit.org/show_bug.cgi?id=197476 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html >+ >+ Add a new IDL attribute, CustomEnabled, which allows non Settings-based enabling of attributes and objects. >+ >+ * Modules/mediacapabilities/MediaCapabilities.idl: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/JSMediaCapabilitiesCustom.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl. >+ (WebCore::JSMediaCapabilitiesEncodingInfoIsEnabled): >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (NeedsRuntimeCheck): >+ (GenerateRuntimeEnableConditionalString): >+ * bindings/scripts/IDLAttributes.json: >+ * bindings/scripts/preprocess-idls.pl: >+ (GenerateConstructorAttributes): >+ * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp: >+ (WebCore::MediaEngineConfigurationFactory::hasDecodingConfigurationFactory): >+ (WebCore::MediaEngineConfigurationFactory::hasEncodingConfigurationFactory): >+ * platform/mediacapabilities/MediaEngineConfigurationFactory.h: >+ > 2019-05-01 Said Abou-Hallawa <sabouhallawa@apple.com> > > REGRESSION (r244182): RenderingUpdate should not be scheduled for invisible pages >diff --git a/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl b/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl >index 43ad568d8e3f3b806e8d8c5b0524a3a949174a8f..b99e194cd05c71e6086347cbb23e7ccfa68a03ea 100644 >--- a/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl >+++ b/Source/WebCore/Modules/mediacapabilities/MediaCapabilities.idl >@@ -25,9 +25,10 @@ > > [ > EnabledBySetting=MediaCapabilities, >- ImplementationLacksVTable >+ ImplementationLacksVTable, >+ JSCustomHeader > ] > interface MediaCapabilities { > [CallWith=Document] Promise<MediaCapabilitiesDecodingInfo> decodingInfo(MediaDecodingConfiguration configuration); >- Promise<MediaCapabilitiesEncodingInfo> encodingInfo(MediaEncodingConfiguration configuration); >+ [CustomEnabled] Promise<MediaCapabilitiesEncodingInfo> encodingInfo(MediaEncodingConfiguration configuration); > }; >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 7bfdca2fbf1b9f6350bdac29ddd8c9c918275eec..9c18885e85168ebca6bae3da3473c7460f52d5f4 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -13423,6 +13423,7 @@ > CCC2B51015F613060048CDD6 /* DeviceClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceClient.h; sourceTree = "<group>"; }; > CCC2B51115F613060048CDD6 /* DeviceController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceController.cpp; sourceTree = "<group>"; }; > CCC2B51215F613060048CDD6 /* DeviceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceController.h; sourceTree = "<group>"; }; >+ CD0320152279F5BF00DD9F0B /* JSMediaCapabilitiesCustom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaCapabilitiesCustom.h; sourceTree = "<group>"; }; > CD063F801E23FA8900812BE3 /* InitDataRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitDataRegistry.cpp; sourceTree = "<group>"; }; > CD063F811E23FA8900812BE3 /* InitDataRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitDataRegistry.h; sourceTree = "<group>"; }; > CD0C8B582141C8CA0062F59D /* MediaCapabilitiesInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaCapabilitiesInfo.h; sourceTree = "<group>"; }; >@@ -20607,6 +20608,7 @@ > 51E269321DD3BC43006B6A58 /* JSIDBTransactionCustom.cpp */, > A7D0318D0E93540300E24ACD /* JSImageDataCustom.cpp */, > 77C13F042165658A002D9C5F /* JSIntersectionObserverEntryCustom.cpp */, >+ CD0320152279F5BF00DD9F0B /* JSMediaCapabilitiesCustom.h */, > AD726FE716D9F204003A4E6D /* JSMediaListCustom.h */, > 415CDAF61E6CE0D3004F11EE /* JSMediaStreamTrackCustom.cpp */, > E1A5F99A0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp */, >diff --git a/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h b/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h >new file mode 100644 >index 0000000000000000000000000000000000000000..995d7f673211da5e095508aeb052bf6715b8924a >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSMediaCapabilitiesCustom.h >@@ -0,0 +1,37 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "MediaEngineConfigurationFactory.h" >+ >+namespace WebCore { >+ >+ALWAYS_INLINE bool JSMediaCapabilitiesEncodingInfoIsEnabled() >+{ >+ return MediaEngineConfigurationFactory::hasEncodingConfigurationFactory(); >+} >+ >+} >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index 505c4f2ef141b35682a174475dec226af9d71dcc..38b7c093b9e733bdc91ceddd09246fdf33a55026 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -1709,7 +1709,8 @@ sub NeedsRuntimeCheck > || $context->extendedAttributes->{EnabledBySetting} > || $context->extendedAttributes->{DisabledByQuirk} > || $context->extendedAttributes->{SecureContext} >- || $context->extendedAttributes->{ContextHasServiceWorkerScheme}; >+ || $context->extendedAttributes->{ContextHasServiceWorkerScheme} >+ || $context->extendedAttributes->{CustomEnabled}; > } > > # https://heycam.github.io/webidl/#es-operations >@@ -3744,6 +3745,13 @@ sub GenerateRuntimeEnableConditionalString > } > } > >+ if ($context->extendedAttributes->{CustomEnabled}) { >+ assert("CustomEnabled can only be used by interfaces only exposed to the Window") if $interface->extendedAttributes->{Exposed} && $interface->extendedAttributes->{Exposed} ne "Window"; >+ >+ my $className = "JS" . $interface->type->name; >+ push(@conjuncts, "${className}" . $codeGenerator->WK_ucfirst($context->name) . "IsEnabled()"); >+ } >+ > if ($context->extendedAttributes->{DisabledByQuirk}) { > assert("Must specify value for DisabledByQuirk.") if $context->extendedAttributes->{DisabledByQuirk} eq "VALUE_IS_MISSING"; > >diff --git a/Source/WebCore/bindings/scripts/IDLAttributes.json b/Source/WebCore/bindings/scripts/IDLAttributes.json >index efe5697948594eca5dc91f1dd2d1129b68b5ad15..64ec7b14a8592a0d3f6adbaba14c940e39c1501e 100644 >--- a/Source/WebCore/bindings/scripts/IDLAttributes.json >+++ b/Source/WebCore/bindings/scripts/IDLAttributes.json >@@ -154,6 +154,9 @@ > "CustomToStringName": { > "contextsAllowed": ["interface"] > }, >+ "CustomEnabled": { >+ "contextsAllowed": ["interface", "dictionary", "enum", "attribute", "operation", "constant", "iterable"] >+ }, > "DOMJIT": { > "contextsAllowed": ["interface", "attribute", "operation"], > "values": ["", "ReadDOM", "Getter"] >diff --git a/Source/WebCore/bindings/scripts/preprocess-idls.pl b/Source/WebCore/bindings/scripts/preprocess-idls.pl >index 9081e11d2b8be6742c2cac6b0ec5a25c12dd321a..0141dd2fd02247ab75ab5c768c1d4db690e9f5bc 100644 >--- a/Source/WebCore/bindings/scripts/preprocess-idls.pl >+++ b/Source/WebCore/bindings/scripts/preprocess-idls.pl >@@ -274,7 +274,7 @@ sub GenerateConstructorAttributes > foreach my $attributeName (sort keys %{$extendedAttributes}) { > next unless ($attributeName eq "Conditional" || $attributeName eq "EnabledAtRuntime" || $attributeName eq "EnabledForWorld" > || $attributeName eq "EnabledBySetting" || $attributeName eq "SecureContext" || $attributeName eq "PrivateIdentifier" >- || $attributeName eq "PublicIdentifier" || $attributeName eq "DisabledByQuirk" || $attributeName eq "EnabledByQuirk"); >+ || $attributeName eq "PublicIdentifier" || $attributeName eq "DisabledByQuirk" || $attributeName eq "EnabledByQuirk" || $attributeName eq "CustomEnabled"); > my $extendedAttribute = $attributeName; > $extendedAttribute .= "=" . $extendedAttributes->{$attributeName} unless $extendedAttributes->{$attributeName} eq "VALUE_IS_MISSING"; > push(@extendedAttributesList, $extendedAttribute); >diff --git a/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp b/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp >index 3efbe117c6ee1a3fc84da5bd239256361957016d..40302e268532882b4fa5baca5765a1ea8ca75b3f 100644 >--- a/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp >+++ b/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.cpp >@@ -33,6 +33,7 @@ > #include "MediaDecodingConfiguration.h" > #include "MediaEncodingConfiguration.h" > #include "MediaEngineConfigurationFactoryMock.h" >+#include <wtf/Algorithms.h> > #include <wtf/NeverDestroyed.h> > #include <wtf/Vector.h> > >@@ -71,6 +72,16 @@ static const FactoryVector& factories() > return factories; > } > >+bool MediaEngineConfigurationFactory::hasDecodingConfigurationFactory() >+{ >+ return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createDecodingConfiguration; }); >+} >+ >+bool MediaEngineConfigurationFactory::hasEncodingConfigurationFactory() >+{ >+ return mockEnabled() || WTF::anyOf(factories(), [] (auto& factory) { return factory.createEncodingConfiguration; }); >+} >+ > void MediaEngineConfigurationFactory::createDecodingConfiguration(MediaDecodingConfiguration&& config, MediaEngineConfigurationFactory::DecodingConfigurationCallback&& callback) > { > if (mockEnabled()) { >diff --git a/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h b/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h >index fb265258a6e229f126233b0a7d4ae16c13ebaec5..197793b1c94aeed5fccb2b36a9d21bcf32424273 100644 >--- a/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h >+++ b/Source/WebCore/platform/mediacapabilities/MediaEngineConfigurationFactory.h >@@ -41,6 +41,9 @@ public: > using DecodingConfigurationCallback = WTF::Function<void(MediaCapabilitiesDecodingInfo&&)>; > using EncodingConfigurationCallback = WTF::Function<void(MediaCapabilitiesEncodingInfo&&)>; > >+ static bool hasDecodingConfigurationFactory(); >+ static bool hasEncodingConfigurationFactory(); >+ > static void createDecodingConfiguration(MediaDecodingConfiguration&&, DecodingConfigurationCallback&&); > static void createEncodingConfiguration(MediaEncodingConfiguration&&, EncodingConfigurationCallback&&); > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 77126e26368e54d8cc2bd65465a7c8d089aa500a..997e58de99cbbc7f61781d6e9b88f4af840db62c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-01 Jer Noble <jer.noble@apple.com> >+ >+ Hide MediaCapabilities.encodingInfo() when the platform does not support it. >+ https://bugs.webkit.org/show_bug.cgi?id=197476 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt: Added. >+ * platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html: Added. >+ * platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt: Added. >+ > 2019-05-01 Truitt Savell <tsavell@apple.com> > > Win10 failing or flakey tests need to be given expectations to allow for new EWS >diff --git a/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..69bab58226802a16b10b7be832edbfb07d6e74b8 >--- /dev/null >+++ b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined-expected.txt >@@ -0,0 +1,11 @@ >+Test that MediaCapabilities.prototype.encodingInfo is missing. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS typeof navigator.mediaCapabilities.encodingInfo is "undefined" >+PASS typeof MediaCapabilities.prototype.encodingInfo is "undefined" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5dc4f31e907406bec14d55fc14c7e6855b596e55 >--- /dev/null >+++ b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-encodingInfo-undefined.html >@@ -0,0 +1,20 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>mediacapabilities-encodingInfo-empty</title> >+ <script src="../../../../resources/js-test-pre.js"></script> >+ <script> >+ >+ </script> >+</head> >+<body> >+<p id="description"></p> >+<div id="console"></div> >+<script> >+description('Test that MediaCapabilities.prototype.encodingInfo is missing.'); >+shouldBe('typeof navigator.mediaCapabilities.encodingInfo', '"undefined"'); >+shouldBe('typeof MediaCapabilities.prototype.encodingInfo', '"undefined"'); >+</script> >+<script src="../../../../resources/js-test-post.js"></script> >+</body> >+</html> >\ No newline at end of file >diff --git a/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..6866f0387a8ffea4727fa7fb474f49f4bb6f9903 >--- /dev/null >+++ b/LayoutTests/platform/mac/media/mediacapabilities/mediacapabilities-types-expected.txt >@@ -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 >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197476
:
368712
|
368733
|
369798
|
370319
|
370427