Enable provider client token test
[ Merge of http://go/wvgerrit/71907 ] The client token needed to be enabled in the license request. Bug: 123369846 Bug: 123370099 Test: WV unit/integration tests Change-Id: I4d3e944b1d79010977c119291594878c406b00c5
This commit is contained in:
@@ -157,6 +157,8 @@ CdmResponseType ClientIdentification::Prepare(
|
|||||||
ClientIdentification_ClientCapabilities* client_capabilities =
|
ClientIdentification_ClientCapabilities* client_capabilities =
|
||||||
client_id->mutable_client_capabilities();
|
client_id->mutable_client_capabilities();
|
||||||
|
|
||||||
|
client_capabilities->set_client_token(true);
|
||||||
|
|
||||||
if (is_license_request_) {
|
if (is_license_request_) {
|
||||||
bool supports_usage_information;
|
bool supports_usage_information;
|
||||||
if (crypto_session_->UsageInformationSupport(&supports_usage_information)) {
|
if (crypto_session_->UsageInformationSupport(&supports_usage_information)) {
|
||||||
|
|||||||
@@ -602,7 +602,9 @@ CdmResponseType CdmLicense::HandleKeyResponse(
|
|||||||
return NO_CONTENT_KEY;
|
return NO_CONTENT_KEY;
|
||||||
}
|
}
|
||||||
license_key_type_ = key_type;
|
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()) {
|
if (license.has_srm_update()) {
|
||||||
CdmResponseType status = crypto_session_->LoadSrm(license.srm_update());
|
CdmResponseType status = crypto_session_->LoadSrm(license.srm_update());
|
||||||
@@ -880,6 +882,9 @@ CdmResponseType CdmLicense::RestoreLicenseForRelease(
|
|||||||
return LICENSE_RESPONSE_PARSE_ERROR_5;
|
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())
|
if (license.id().has_provider_session_token())
|
||||||
provider_session_token_ = license.id().provider_session_token();
|
provider_session_token_ = license.id().provider_session_token();
|
||||||
|
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ TEST_F(CdmLicenseTest, PrepareKeyRequestValidation) {
|
|||||||
|
|
||||||
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
||||||
client_capabilities = client_id.client_capabilities();
|
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_TRUE(client_capabilities.has_session_token());
|
||||||
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
||||||
EXPECT_EQ(video_widevine::
|
EXPECT_EQ(video_widevine::
|
||||||
@@ -505,7 +505,7 @@ TEST_F(CdmLicenseTest, PrepareKeyRequestValidationV15) {
|
|||||||
|
|
||||||
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
const ::video_widevine::ClientIdentification_ClientCapabilities&
|
||||||
client_capabilities = client_id.client_capabilities();
|
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_TRUE(client_capabilities.has_session_token());
|
||||||
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
EXPECT_FALSE(client_capabilities.video_resolution_constraints());
|
||||||
EXPECT_EQ(video_widevine::
|
EXPECT_EQ(video_widevine::
|
||||||
|
|||||||
@@ -4086,7 +4086,7 @@ TEST_F(WvCdmRequestLicenseTest, UsageRemoveSecureStopTest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(rfrias): Enable when b/123370099 has been addressed
|
// TODO(rfrias): Enable when b/123370099 has been addressed
|
||||||
TEST_F(WvCdmRequestLicenseTest, DISABLED_VerifyProviderClientToken) {
|
TEST_F(WvCdmRequestLicenseTest, VerifyProviderClientToken) {
|
||||||
Unprovision();
|
Unprovision();
|
||||||
Provision(kLevelDefault);
|
Provision(kLevelDefault);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user