From 111848cbd04da2b34cec2ffc1ab3452f8431b2db Mon Sep 17 00:00:00 2001 From: Edwin Wong Date: Tue, 8 Aug 2017 15:31:30 -0700 Subject: [PATCH] Add test for additional ClearKey UUID. Test for both ClearKey plugin UUIDs in DrmHalClearkeyFactoryTest. Test: VTS - VtsHalDrmV1_0TargetTest bug: 64386897 Change-Id: Id7f140518910a87efdf9eaa19ce16113e206264f --- drm/1.0/vts/functional/drm_hal_clearkey_test.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp index 556451374e..3966eac15b 100644 --- a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp +++ b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp @@ -76,9 +76,12 @@ using std::vector; #define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk()) #define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk()) -static const uint8_t kClearKeyUUID[16] = { - 0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02, - 0xAC, 0xE3, 0x3C, 0x1E, 0x52, 0xE2, 0xFB, 0x4B}; +static const uint8_t kCommonPsshBoxUUID[16] = {0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02, + 0xAC, 0xE3, 0x3C, 0x1E, 0x52, 0xE2, 0xFB, 0x4B}; + +// To be used in mpd to specify drm scheme for players +static const uint8_t kClearKeyUUID[16] = {0xE2, 0x71, 0x9D, 0x58, 0xA9, 0x85, 0xB3, 0xC9, + 0x78, 0x1A, 0xB0, 0x30, 0xAF, 0x78, 0xD3, 0x0E}; static const uint8_t kInvalidUUID[16] = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, @@ -111,6 +114,9 @@ class DrmHalClearkeyFactoryTest : public ::testing::VtsHalHidlTargetTestBase { * Ensure the factory supports the clearkey scheme UUID */ TEST_F(DrmHalClearkeyFactoryTest, ClearKeyPluginSupported) { + EXPECT_TRUE(drmFactory->isCryptoSchemeSupported(kCommonPsshBoxUUID)); + EXPECT_TRUE(cryptoFactory->isCryptoSchemeSupported(kCommonPsshBoxUUID)); + EXPECT_TRUE(drmFactory->isCryptoSchemeSupported(kClearKeyUUID)); EXPECT_TRUE(cryptoFactory->isCryptoSchemeSupported(kClearKeyUUID)); }