Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-interfaces: Commit

hardware/interfaces


Commit MetaInfo

Révision2528c405f3164c24f6dbf351b904f27265a5e9a8 (tree)
l'heure2017-10-12 03:33:25
AuteurTreeHugger Robot <treehugger-gerrit@goog...>
CommiterAndroid (Google) Code Review

Message de Log

Merge "Added VTS tests for requiresSecureDecoderComponent and release API" into oc-mr1-dev

Change Summary

Modification

--- 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) {
468468 EXPECT_TRUE(returnStatus.isOk());
469469 EXPECT_EQ(Status::OK, returnStatus);
470470
471+ EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent("video/avc"));
472+
471473 sp<IDescrambler> descrambler;
472474 descrambler = IDescrambler::castFrom(mDescramblerBase);
473475 ASSERT_NE(descrambler, nullptr);
@@ -485,6 +487,14 @@ TEST_F(MediaCasHidlTest, TestClearKeyApis) {
485487 memcmp(static_cast<const void*>(opBuffer), static_cast<const void*>(kOutRefBinaryBuffer),
486488 sizeof(kOutRefBinaryBuffer));
487489 EXPECT_EQ(0, compareResult);
490+
491+ returnStatus = mDescramblerBase->release();
492+ EXPECT_TRUE(returnStatus.isOk());
493+ EXPECT_EQ(Status::OK, returnStatus);
494+
495+ returnStatus = mMediaCas->release();
496+ EXPECT_TRUE(returnStatus.isOk());
497+ EXPECT_EQ(Status::OK, returnStatus);
488498 }
489499
490500 TEST_F(MediaCasHidlTest, TestClearKeySessionClosedAfterRelease) {
@@ -595,6 +605,12 @@ TEST_F(MediaCasHidlTest, TestClearKeyErrors) {
595605
596606 ASSERT_TRUE(descrambleTestInputBuffer(descrambler, &descrambleStatus, &dataMemory));
597607 EXPECT_EQ(Status::ERROR_CAS_DECRYPT, descrambleStatus);
608+
609+ // Verify that requiresSecureDecoderComponent handles empty mime
610+ EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent(""));
611+
612+ // Verify that requiresSecureDecoderComponent handles invalid mime
613+ EXPECT_FALSE(mDescramblerBase->requiresSecureDecoderComponent("bad"));
598614 }
599615
600616 } // anonymous namespace
Afficher sur ancien navigateur de dépôt.