Fix CanSetServiceCertificate Test
(This is a merge of http://go/wvgerrit/14783) When validation was added to the service certificate property, it broke the associated test, which sends random data. It also did not do any testing of the new validation itself. This fix makes the validation method on WvContentDecryptionModule non-static so that it can be mocked and handled appropriately in the test. Bug: 21923281 Change-Id: Id5d2315709fce35f9347b3545f594371810349f0
This commit is contained in:
@@ -38,11 +38,6 @@ bool WvContentDecryptionModule::IsWebm(const std::string& init_data_type) {
|
||||
return InitializationData(init_data_type).is_webm();
|
||||
}
|
||||
|
||||
bool WvContentDecryptionModule::IsValidServiceCertificate(
|
||||
const std::string& certificate) {
|
||||
return CdmLicense::VerifySignedServiceCertificate(certificate) == NO_ERROR;
|
||||
}
|
||||
|
||||
CdmResponseType WvContentDecryptionModule::OpenSession(
|
||||
const CdmKeySystem& key_system, CdmClientPropertySet* property_set,
|
||||
const std::string& origin, WvCdmEventListener* event_listener,
|
||||
@@ -214,6 +209,11 @@ void WvContentDecryptionModule::NotifyResolution(const CdmSessionId& session_id,
|
||||
cdm_engine_->NotifyResolution(session_id, width, height);
|
||||
}
|
||||
|
||||
bool WvContentDecryptionModule::IsValidServiceCertificate(
|
||||
const std::string& certificate) {
|
||||
return CdmLicense::VerifySignedServiceCertificate(certificate) == NO_ERROR;
|
||||
}
|
||||
|
||||
void WvContentDecryptionModule::EnablePolicyTimer() {
|
||||
AutoLock auto_lock(policy_timer_lock_);
|
||||
if (!policy_timer_.IsRunning())
|
||||
|
||||
Reference in New Issue
Block a user