Source release 19.4.0

This commit is contained in:
Vicky Min
2024-11-27 00:07:23 +00:00
parent 11c108a8da
commit 22759672a8
72 changed files with 5321 additions and 2622 deletions

View File

@@ -201,12 +201,15 @@ class CdmLicenseTestPeer : public CdmLicense {
CdmLicenseTestPeer(const CdmSessionId& session_id, wvutil::Clock* clock)
: CdmLicense(session_id, clock) {}
using CdmLicense::HandleNewEntitledKeys;
CdmResponseType HandleNewEntitledKeys(
const std::vector<PsshEntitledKey>& packaged_entitled_keys) {
return HandleNewEntitledKeysForTest(packaged_entitled_keys);
}
void set_entitlement_keys(const License& license) {
void SetEntitlementKeys(const License& license) {
for (const auto& key_container : license.key()) {
if (key_container.type() != KeyContainer::ENTITLEMENT) continue;
entitlement_key_ids_.insert(key_container.id());
InsertEntitlementKeyIdForTest(key_container.id());
}
}
};
@@ -608,10 +611,11 @@ TEST_P(CdmLicenseEntitledKeyTest, LoadsEntitledKeys) {
// Set up the CdmLicense with the mocks and fake entitlement key
ASSERT_TRUE(cdm_license_->Init(true, kDefaultServiceCertificate,
crypto_session_.get(), policy_engine_.get()));
cdm_license_->set_entitlement_keys(entitlement_license);
cdm_license_->SetEntitlementKeys(entitlement_license);
// Call the function under test and check its return value
CdmResponseType ret = cdm_license_->HandleNewEntitledKeys(entitled_keys);
const CdmResponseType ret =
cdm_license_->HandleNewEntitledKeys(entitled_keys);
if (variant.should_succeed) {
EXPECT_EQ(KEY_ADDED, ret);