Commit 2baa7afe authored by John Rummell's avatar John Rummell Committed by Commit Bot

[eme] Enable checking of 'cbcs' support in Widevine

Recent versions of Widevine support 'cbcs' encrypted files, so add a query
test to verify that it is supported. As well, on systems where Widevine is
not component updated, indicate that the bundled Widevine does support
'cbcs' decryption.

BUG=835009
TEST=new browser_tests pass

Change-Id: Icc4294cca4ac9ba97c2a22816217c57e2262d30a
Reviewed-on: https://chromium-review.googlesource.com/1101405Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567433}
parent 2d1138f4
......@@ -1062,6 +1062,24 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Robustness) {
#endif
}
IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest,
EncryptionScheme) {
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, nullptr));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, nullptr));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs"));
// Invalid encryption schemes will be rejected. However, invalid values
// generate a TypeError (The provided value '...' is not a valid enum value
// of type EncryptionScheme), which is not handled by the test page.
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kWidevine, ""));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kWidevine, ""));
}
//
// Misc failure test cases.
//
......
......@@ -162,9 +162,11 @@ bool IsWidevineAvailable(
*supports_persistent_license = false;
#endif // defined(OS_CHROMEOS)
// TODO(crbug.com/835009): Update once Widevine on Linux supports more
// encryption schemes.
// Add the supported encryption schemes as if they came from the
// component manifest. This list must match the CDM that is being
// bundled with Chrome.
modes_supported->insert(media::EncryptionMode::kCenc);
modes_supported->insert(media::EncryptionMode::kCbcs);
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment