Merge "Added VTS tests for requiresSecureDecoderComponent and release API" into oc-mr1-dev
This commit is contained in:
commit
2528c405f3
1 changed files with 16 additions and 0 deletions
|
@ -468,6 +468,8 @@ TEST_F(MediaCasHidlTest, TestClearKeyApis) {
|
|||
EXPECT_TRUE(returnStatus.isOk());
|
||||
EXPECT_EQ(Status::OK, returnStatus);
|
||||
|
||||
EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent("video/avc"));
|
||||
|
||||
sp<IDescrambler> descrambler;
|
||||
descrambler = IDescrambler::castFrom(mDescramblerBase);
|
||||
ASSERT_NE(descrambler, nullptr);
|
||||
|
@ -485,6 +487,14 @@ TEST_F(MediaCasHidlTest, TestClearKeyApis) {
|
|||
memcmp(static_cast<const void*>(opBuffer), static_cast<const void*>(kOutRefBinaryBuffer),
|
||||
sizeof(kOutRefBinaryBuffer));
|
||||
EXPECT_EQ(0, compareResult);
|
||||
|
||||
returnStatus = mDescramblerBase->release();
|
||||
EXPECT_TRUE(returnStatus.isOk());
|
||||
EXPECT_EQ(Status::OK, returnStatus);
|
||||
|
||||
returnStatus = mMediaCas->release();
|
||||
EXPECT_TRUE(returnStatus.isOk());
|
||||
EXPECT_EQ(Status::OK, returnStatus);
|
||||
}
|
||||
|
||||
TEST_F(MediaCasHidlTest, TestClearKeySessionClosedAfterRelease) {
|
||||
|
@ -595,6 +605,12 @@ TEST_F(MediaCasHidlTest, TestClearKeyErrors) {
|
|||
|
||||
ASSERT_TRUE(descrambleTestInputBuffer(descrambler, &descrambleStatus, &dataMemory));
|
||||
EXPECT_EQ(Status::ERROR_CAS_DECRYPT, descrambleStatus);
|
||||
|
||||
// Verify that requiresSecureDecoderComponent handles empty mime
|
||||
EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent(""));
|
||||
|
||||
// Verify that requiresSecureDecoderComponent handles invalid mime
|
||||
EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent("bad"));
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
Loading…
Reference in a new issue