Merge "Enable provider client token test"

This commit is contained in:
Rahul Frias
2019-02-01 21:44:02 +00:00
committed by Android (Google) Code Review
4 changed files with 11 additions and 4 deletions

View File

@@ -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)) {

View File

@@ -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();

View File

@@ -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::

View File

@@ -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);