Merge "Adjust cdm engine test response to nonce flood"

This commit is contained in:
TreeHugger Robot
2018-02-26 23:06:18 +00:00
committed by Android (Google) Code Review

View File

@@ -183,6 +183,10 @@ class WvCdmEnginePreProvTest : public testing::Test {
CdmCertificateType cert_type = kCertificateWidevine;
std::string cert_authority;
std::string cert, wrapped_key;
// Keep a crypto session alive so that OEMCrypto won't terminate while we
// try to provision. This is needed for testing nonce floods.
CryptoSession keep_alive(cdm_engine_.GetMetrics()->GetCryptoMetrics());
ASSERT_EQ(NO_ERROR, cdm_engine_.SetProvisioningServiceCertificate(
g_provisioning_service_certificate));
CdmResponseType result = NO_ERROR;