Issue metadata
Sign in to add a comment
|
Encrypted media browser tests involving Widevine fail when branding != Chrome |
||||||||||||||||||||||
Issue descriptionVersion: 53.0.2774.0 OS: Mac, Windows What steps will reproduce the problem? (1) Generate projects with these variables set: proprietary_codecs=1 enable_widevine=1 (2) Build browser_tests (3) Run browser_tests --gtest_filter=EncryptedMediaSupportedTypesWidevineTest.Basic What is the expected output? [ RUN ] EncryptedMediaSupportedTypesWidevineTest.Basic [ OK ] EncryptedMediaSupportedTypesWidevineTest.Basic, where TypeParam = and GetParam() = (2631 ms) What do you see instead? [ RUN ] EncryptedMediaSupportedTypesWidevineTest.Basic ../../chrome/browser/media/encrypted_media_supported_types_browsertest.cc:583: Failure Value of: AreCodecsSupportedByKeySystem( kVideoWebMMimeType, no_codecs(), kWidevine) Actual: "Unsupported keySystem" Expected: kSuccessResult Which is: "success" ../../chrome/browser/media/encrypted_media_supported_types_browsertest.cc:585: Failure Value of: AreCodecsSupportedByKeySystem( kAudioWebMMimeType, no_codecs(), kWidevine) Actual: "Unsupported keySystem" Expected: kSuccessResult Which is: "success" ../../chrome/browser/media/encrypted_media_supported_types_browsertest.cc:587: Failure Value of: AreCodecsSupportedByKeySystem( kVideoMP4MimeType, no_codecs(), kWidevine) Actual: "Unsupported keySystem" Expected: kSuccessResult Which is: "success" ../../chrome/browser/media/encrypted_media_supported_types_browsertest.cc:589: Failure Value of: AreCodecsSupportedByKeySystem( kAudioMP4MimeType, no_codecs(), kWidevine) Actual: "Unsupported keySystem" Expected: kSuccessResult Which is: "success" [ FAILED ] EncryptedMediaSupportedTypesWidevineTest.Basic, where TypeParam = and GetParam() = (2631 ms) I think this is a consequence of https://chromium.googlesource.com/chromium/src/+/3be44be552846983cf371256718ce8ec81c565b4%5E%21/, which seems to assume the tests are built with branding=Chrome and thus have access to the bundled Widevine component. Opera would like to keep running these tests, but of course we don't build with Chrome branding. Can this be fixed so that tests still pass when branding != Chrome? Probably by falling back to the stub Widevine CDM that should be bundled with the test binaries in this case? In case the Chromium team is not interested in keeping the tests in good shape for this build configuration, I'm willing to cook up a CL myself. But I'd appreciate some advice on the best course of action.
,
Jun 22 2016
Issue 468584 would hopefully give us the proper build flags for this. In the meantime, you could define a new preprocessor macro in the local GYP/GN file for this test. There is some logic to build the stub CDM in third_party/widevine/cdm/BUILD.gn, but it is a bit scattered.
,
Jun 23 2016
Thanks for the pointers. Note that EncryptedMediaTest has a similar problem, e.g., MSE_Widevine/EncryptedMediaTest.Playback_AudioOnly_WebM/0 doesn't see the stub Widevine CDM anymore and fails. The stub CDM is already built and available in this configuration (at out/Debug/WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib) when building browser_tests, and so is the adapter plugin. It seems the plugin registration is the only missing part. It used to be done manually via RegisterPepperCdm() in EncryptedMediaTest. After 3be44be552846983cf371256718ce8ec81c565b4, is RegisterWidevineCdmComponent() supposed to succeed? Can we make it successfully register the plugin and have it load the stub CDM when branding != Chrome? Currently it looks for the plugin in "/Users/wdzierzanowski/src/chromium/src/out/Debug/Chromium.app/Contents/Versions/53.0.2774.0/Chromium Framework.framework/Libraries/WidevineCdm/_platform_specific/mac_x64/" and fails. So we'd probably need a build step that copies the plugin files to this path. We'd probably also need some fake plugin manifest for the registration to succeed. If this is too cumbersome then perhaps we should just bring back RegisterPepperCdm() for the non-bundled Widevine case instead. In any case, once we figure out some way to use the stub CDM in browset_tests again, can we use it in EncryptedMediaSupportedTypes tests too instead of changing the expectations to "Unsupported keySystem"?
,
Jun 23 2016
,
Jun 23 2016
I think the fundamental issue is that now we assume the CDM is actually available (shipped with the browser) if WIDEVINE_CDM_AVAILABLE is true. This is not the case for browsers that uses enable_widevine=1. It's definitely possible to fake a manifest to get the test pass. With the manifest, DefaultComponentInstaller::FindPreinstallation() should find the CDM, and the CDM should will be registered there automatically. This will work on Windows GYP/GN builds, and Mac GYP build. The only exception is Mac GN build, where the browser_tests uses SetOverrideAmIBundled(). So it'll look for the plugin in the bundled path directly, something like Chromium.app/Contents/Versions/53.0.2774.0/Chromium Framework.framework/Libraries/WidevineCdm/_platform_specific/mac_x64/. In this case, you'll need to make sure the cdm, adapter and manifest are in the bundled path (currently we only do this for chrome branding), see https://chromiumcodereview.appspot.com/2033923002/ and the associated bug for details. If you do this, you'll have to make sure you don't ship the manifest by accident in your production. I assume you are already doing this for the stub CDM somehow. If that seems too much trouble. I am fine with just bringing back RegisterPepperCdm() as you suggested. In either case, how we register the CDM is different from how the CDM is registered in production (where CDM is component updated), so we'll always have some gap in test coverage there. But thinking about it more, by faking a bundled CDM we are actually closer to the production code since the CDM will be registered by component installer, which is what you use in production. Could you please give it a try to see how bad/hard it is?
,
Jun 23 2016
give to xhwang@ so remove this bug from untriaged bucket.
,
Jun 23 2016
I don't have time to work on this any time soon, so tentatively assign to wdzierzanowski. Feel free to reassign or remove yourself if you don't have time to work on this either.
,
Jun 24 2016
Not right now, sorry. I may have time to have a go at it in a few weeks though.
,
Jul 8 2016
,
Jul 11 2016
,
Aug 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/119e34c6ce824a2ecd21e0aa3bc401ae604110fa commit 119e34c6ce824a2ecd21e0aa3bc401ae604110fa Author: wdzierzanowski <wdzierzanowski@opera.com> Date: Fri Aug 26 14:33:13 2016 Bundle fake Widevine component manifest for stub CDM Encrypted media browser tests involving Widevine use the stub CDM when branding != Chrome. This change allows them to register the preinstalled component containing the stub CDM. BUG= 622273 TEST=Widevine browser tests 'browser_tests --gtest_filter=*Widevine*' pass Review-Url: https://codereview.chromium.org/2136983002 Cr-Commit-Position: refs/heads/master@{#414706} [modify] https://crrev.com/119e34c6ce824a2ecd21e0aa3bc401ae604110fa/chrome/BUILD.gn [modify] https://crrev.com/119e34c6ce824a2ecd21e0aa3bc401ae604110fa/third_party/widevine/cdm/BUILD.gn [add] https://crrev.com/119e34c6ce824a2ecd21e0aa3bc401ae604110fa/third_party/widevine/cdm/stub/manifest.json
,
Sep 1 2016
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ddorwin@chromium.org
, Jun 22 2016