diff --git a/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp b/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp index 4a6ccd7645..d3b0f1da3b 100644 --- a/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp +++ b/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp @@ -468,6 +468,8 @@ TEST_F(MediaCasHidlTest, TestClearKeyApis) { EXPECT_TRUE(returnStatus.isOk()); EXPECT_EQ(Status::OK, returnStatus); + EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent("video/avc")); + sp descrambler; descrambler = IDescrambler::castFrom(mDescramblerBase); ASSERT_NE(descrambler, nullptr); @@ -485,6 +487,14 @@ TEST_F(MediaCasHidlTest, TestClearKeyApis) { memcmp(static_cast(opBuffer), static_cast(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