Make CdmProvisioningResponse const and DeviceFiles level support
* Make CdmProvisioningResponse const. [ Merge of http://go/wvgerrit/14618 ] The lack of const on this reference seems to be a mistake, since the responses is never modified. This also allows the new CE CDM to pass responses directly through from the caller. * Let Properties determine DeviceFiles level support [ Merge of http://go/wvgerrit/14620 ] Non-Android platforms do not have multiple security levels, and so do not use the security level to construct a base path. Instead of requiring a known "security level" to construct a file, accept anything that platform Properties will accept as a base path. * Drop Properties::GetSecurityLevel(). [ Merge of http://go/wvgerrit/14617 ] This seems to be dead code. Change-Id: I94a970279213100730d6e6c763558dbe386f936a
This commit is contained in:
@@ -957,17 +957,29 @@ TEST_F(WvCdmRequestLicenseTest, PropertySetTest) {
|
||||
decryptor_.OpenSession(g_key_system, &property_set_Ln, EMPTY_ORIGIN, NULL,
|
||||
&session_id_Ln);
|
||||
|
||||
std::string security_level;
|
||||
EXPECT_TRUE(Properties::GetSecurityLevel(session_id_L1, &security_level));
|
||||
CdmQueryMap query_info;
|
||||
EXPECT_EQ(wvcdm::NO_ERROR,
|
||||
decryptor_.QuerySessionStatus(session_id_L1, &query_info));
|
||||
CdmQueryMap::iterator itr = query_info.find(wvcdm::QUERY_KEY_SECURITY_LEVEL);
|
||||
EXPECT_TRUE(itr != query_info.end());
|
||||
std::string security_level = itr->second;
|
||||
EXPECT_TRUE(!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L1) ||
|
||||
!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L3));
|
||||
EXPECT_TRUE(Properties::UsePrivacyMode(session_id_L1));
|
||||
|
||||
EXPECT_TRUE(Properties::GetSecurityLevel(session_id_L3, &security_level));
|
||||
EXPECT_EQ(wvcdm::NO_ERROR,
|
||||
decryptor_.QuerySessionStatus(session_id_L3, &query_info));
|
||||
itr = query_info.find(wvcdm::QUERY_KEY_SECURITY_LEVEL);
|
||||
EXPECT_TRUE(itr != query_info.end());
|
||||
security_level = itr->second;
|
||||
EXPECT_EQ(security_level, QUERY_VALUE_SECURITY_LEVEL_L3);
|
||||
EXPECT_FALSE(Properties::UsePrivacyMode(session_id_L3));
|
||||
|
||||
EXPECT_TRUE(Properties::GetSecurityLevel(session_id_Ln, &security_level));
|
||||
EXPECT_EQ(wvcdm::NO_ERROR,
|
||||
decryptor_.QuerySessionStatus(session_id_Ln, &query_info));
|
||||
itr = query_info.find(wvcdm::QUERY_KEY_SECURITY_LEVEL);
|
||||
EXPECT_TRUE(itr != query_info.end());
|
||||
security_level = itr->second;
|
||||
EXPECT_TRUE(security_level.empty() ||
|
||||
!security_level.compare(QUERY_VALUE_SECURITY_LEVEL_L3));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user