Commit 0549b9a6 authored by John Rummell's avatar John Rummell Committed by Commit Bot

Reenable MediaDrmBridgeTest.Provision_Widevine test

On Android M devices, occasionally MediaDrm.getProvisionRequest()
throws, resulting in a flaky test. Reenabling the test for all
Android versions other than M.

Bug: 973096
Test: reenabled test passes
Change-Id: I87a78d737653cff3bd1a3727f0d673844cfa3db2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1669176
Commit-Queue: John Rummell <jrummell@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672619}
parent d1593128
...@@ -174,7 +174,7 @@ TEST_F(MediaDrmBridgeTest, CreateWithSecurityLevel_Widevine) { ...@@ -174,7 +174,7 @@ TEST_F(MediaDrmBridgeTest, CreateWithSecurityLevel_Widevine) {
CreateWithoutSessionSupport(kWidevineKeySystem, kTestOrigin, kL1); CreateWithoutSessionSupport(kWidevineKeySystem, kTestOrigin, kL1);
} }
TEST_F(MediaDrmBridgeTest, DISABLED_Provision_Widevine) { TEST_F(MediaDrmBridgeTest, Provision_Widevine) {
// Only test this if Widevine is supported. Otherwise // Only test this if Widevine is supported. Otherwise
// CreateWithoutSessionSupport() will return null and it can't be tested. // CreateWithoutSessionSupport() will return null and it can't be tested.
if (!MediaDrmBridge::IsKeySystemSupported(kWidevineKeySystem)) { if (!MediaDrmBridge::IsKeySystemSupported(kWidevineKeySystem)) {
...@@ -189,6 +189,16 @@ TEST_F(MediaDrmBridgeTest, DISABLED_Provision_Widevine) { ...@@ -189,6 +189,16 @@ TEST_F(MediaDrmBridgeTest, DISABLED_Provision_Widevine) {
return; return;
} }
// On Android M occasionally MediaDrm.getProvisionRequest() throws and thus a
// request can not be generated. This has been fixed in Android N. As Android
// M is unlikely to be fixed, disabling this test if running on Android M.
// http://crbug.com/973096#c21
if (base::android::BuildInfo::GetInstance()->sdk_int() ==
base::android::SDK_VERSION_MARSHMALLOW) {
VLOG(0) << "Disabled for Android M.";
return;
}
// Calling Provision() later should trigger a provisioning request. As we // Calling Provision() later should trigger a provisioning request. As we
// can't pass the request to a license server, // can't pass the request to a license server,
// MockProvisionFetcher::Retrieve() simply drops the request and never // MockProvisionFetcher::Retrieve() simply drops the request and never
......
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