Respect Client Properties when reporting CDM Status
[ Merge from go/wvgerrit/14286 ] CDM now reports status information associated with the specified security level. Earlier information would be reported from the default security level. b/18709693 Change-Id: I7a01e8ea9773b56951c207437ce85e567fd32b09
This commit is contained in:
@@ -60,7 +60,7 @@ class MockCDM : public WvContentDecryptionModule {
|
||||
MOCK_METHOD2(RestoreKey, CdmResponseType(const CdmSessionId&,
|
||||
const CdmKeySetId&));
|
||||
|
||||
MOCK_METHOD1(QueryStatus, CdmResponseType(CdmQueryMap*));
|
||||
MOCK_METHOD2(QueryStatus, CdmResponseType(SecurityLevel, CdmQueryMap*));
|
||||
|
||||
MOCK_METHOD2(QueryKeyStatus, CdmResponseType(const CdmSessionId&,
|
||||
CdmQueryMap*));
|
||||
@@ -812,20 +812,20 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
|
||||
CdmQueryMap maxSessionsMap;
|
||||
maxSessionsMap[QUERY_KEY_MAX_NUMBER_OF_SESSIONS] = maxSessions;
|
||||
|
||||
EXPECT_CALL(cdm, QueryStatus(_))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(l1Map),
|
||||
EXPECT_CALL(cdm, QueryStatus(_, _))
|
||||
.WillOnce(DoAll(SetArgPointee<1>(l1Map),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(l3Map),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(l3Map),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(deviceIDMap),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(deviceIDMap),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(systemIDMap),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(systemIDMap),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(provisioningIDMap),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(provisioningIDMap),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(openSessionsMap),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(openSessionsMap),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(maxSessionsMap),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(maxSessionsMap),
|
||||
Return(wvcdm::NO_ERROR)));
|
||||
|
||||
String8 stringResult;
|
||||
@@ -1457,8 +1457,8 @@ TEST_F(WVDrmPluginTest, CanSetAppId) {
|
||||
Return(wvcdm::NO_ERROR)));
|
||||
|
||||
// Provide expected behavior when plugin queries for the security level
|
||||
EXPECT_CALL(cdm, QueryStatus(_))
|
||||
.WillRepeatedly(DoAll(SetArgPointee<0>(l3Map),
|
||||
EXPECT_CALL(cdm, QueryStatus(_, _))
|
||||
.WillRepeatedly(DoAll(SetArgPointee<1>(l3Map),
|
||||
Return(wvcdm::NO_ERROR)));
|
||||
|
||||
// Provide expected behavior when plugin requests session control info
|
||||
@@ -1539,10 +1539,10 @@ TEST_F(WVDrmPluginTest, CanSetSecurityLevel) {
|
||||
CdmQueryMap l3Map;
|
||||
l3Map[QUERY_KEY_SECURITY_LEVEL] = QUERY_VALUE_SECURITY_LEVEL_L3;
|
||||
|
||||
EXPECT_CALL(cdm, QueryStatus(_))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(l3Map),
|
||||
EXPECT_CALL(cdm, QueryStatus(_, _))
|
||||
.WillOnce(DoAll(SetArgPointee<1>(l3Map),
|
||||
Return(wvcdm::NO_ERROR)))
|
||||
.WillOnce(DoAll(SetArgPointee<0>(l1Map),
|
||||
.WillOnce(DoAll(SetArgPointee<1>(l1Map),
|
||||
Return(wvcdm::NO_ERROR)));
|
||||
|
||||
// Provide expected mock behavior
|
||||
|
||||
Reference in New Issue
Block a user