Make OEM Crypto API version available through mediaDrm properties

[ Merge of http://go/wvgerrit/15540 ]

b/22771529

Change-Id: I8a3d3b3d7a943c531ef0ff2c860442e0690b9175
This commit is contained in:
Rahul Frias
2015-09-08 16:33:58 -07:00
parent 8b0a0ff046
commit 199cfb8f19
5 changed files with 72 additions and 0 deletions

View File

@@ -827,6 +827,10 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
CdmQueryMap maxSessionsMap;
maxSessionsMap[QUERY_KEY_MAX_NUMBER_OF_SESSIONS] = maxSessions;
static const string oemCryptoApiVersion = "10";
CdmQueryMap oemCryptoApiVersionMap;
oemCryptoApiVersionMap[QUERY_KEY_OEMCRYPTO_API_VERSION] = oemCryptoApiVersion;
EXPECT_CALL(*cdm, QueryStatus(_, _))
.WillOnce(DoAll(SetArgPointee<1>(l1Map),
Return(wvcdm::NO_ERROR)))
@@ -841,6 +845,8 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
.WillOnce(DoAll(SetArgPointee<1>(openSessionsMap),
Return(wvcdm::NO_ERROR)))
.WillOnce(DoAll(SetArgPointee<1>(maxSessionsMap),
Return(wvcdm::NO_ERROR)))
.WillOnce(DoAll(SetArgPointee<1>(oemCryptoApiVersionMap),
Return(wvcdm::NO_ERROR)));
String8 stringResult;
@@ -890,6 +896,10 @@ TEST_F(WVDrmPluginTest, ReturnsExpectedPropertyValues) {
res = plugin.getPropertyString(String8("maxNumberOfSessions"), stringResult);
ASSERT_EQ(OK, res);
EXPECT_EQ(maxSessions, stringResult.string());
res = plugin.getPropertyString(String8("oemCryptoApiVersion"), stringResult);
ASSERT_EQ(OK, res);
EXPECT_EQ(oemCryptoApiVersion, stringResult.string());
}
TEST_F(WVDrmPluginTest, DoesNotGetUnknownProperties) {