Adjust cdm engine test response to nonce flood
Merge from Widevine repo of http://go/wvgerrit/43720 This CL changes the cdm engine test's Provision method so that it keeps OEMCrypto alive during the provisioning. This is only needed when testing with the oemcrypto mock and the nonce flood rate has been throttled to 1. In that case, if OEMCrypto is allowed to terminate between each request, all nonce requests will be an error. Keeping OEMCrypto alive does not modify the desired test results when oemcrypto is not throttled. This CL changes test code only. bug: 73607610 test: unit tests Change-Id: I71b27b1bb8200188a0a821afc977d7a9cc7fd968
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user