Merge "Enable provider client token test"
This commit is contained in:
@@ -157,6 +157,8 @@ CdmResponseType ClientIdentification::Prepare(
|
||||
ClientIdentification_ClientCapabilities* client_capabilities =
|
||||
client_id->mutable_client_capabilities();
|
||||
|
||||
client_capabilities->set_client_token(true);
|
||||
|
||||
if (is_license_request_) {
|
||||
bool supports_usage_information;
|
||||
if (crypto_session_->UsageInformationSupport(&supports_usage_information)) {
|
||||
|
||||
@@ -602,7 +602,9 @@ CdmResponseType CdmLicense::HandleKeyResponse(
|
||||
return NO_CONTENT_KEY;
|
||||
}
|
||||
license_key_type_ = key_type;
|
||||
provider_client_token_ = license.provider_client_token();
|
||||
|
||||
if (license.has_provider_client_token())
|
||||
provider_client_token_ = license.provider_client_token();
|
||||
|
||||
if (license.has_srm_update()) {
|
||||
CdmResponseType status = crypto_session_->LoadSrm(license.srm_update());
|
||||
@@ -880,6 +882,9 @@ CdmResponseType CdmLicense::RestoreLicenseForRelease(
|
||||
return LICENSE_RESPONSE_PARSE_ERROR_5;
|
||||
}
|
||||
|
||||
if (license.has_provider_client_token())
|
||||
provider_client_token_ = license.provider_client_token();
|
||||
|
||||
if (license.id().has_provider_session_token())
|
||||
provider_session_token_ = license.id().provider_session_token();
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ TEST_F(CdmLicenseTest, PrepareKeyRequestValidation) {
|
||||
|
||||
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
||||
client_capabilities = client_id.client_capabilities();
|
||||
EXPECT_FALSE(client_capabilities.has_client_token());
|
||||
EXPECT_TRUE(client_capabilities.has_client_token());
|
||||
EXPECT_TRUE(client_capabilities.has_session_token());
|
||||
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
||||
EXPECT_EQ(video_widevine::
|
||||
@@ -505,7 +505,7 @@ TEST_F(CdmLicenseTest, PrepareKeyRequestValidationV15) {
|
||||
|
||||
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
||||
client_capabilities = client_id.client_capabilities();
|
||||
EXPECT_FALSE(client_capabilities.has_client_token());
|
||||
EXPECT_TRUE(client_capabilities.has_client_token());
|
||||
EXPECT_TRUE(client_capabilities.has_session_token());
|
||||
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
||||
EXPECT_EQ(video_widevine::
|
||||
|
||||
@@ -4086,7 +4086,7 @@ TEST_F(WvCdmRequestLicenseTest, UsageRemoveSecureStopTest) {
|
||||
}
|
||||
|
||||
// TODO(rfrias): Enable when b/123370099 has been addressed
|
||||
TEST_F(WvCdmRequestLicenseTest, DISABLED_VerifyProviderClientToken) {
|
||||
TEST_F(WvCdmRequestLicenseTest, VerifyProviderClientToken) {
|
||||
Unprovision();
|
||||
Provision(kLevelDefault);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user