Add test for additional ClearKey UUID.

Test for both ClearKey plugin UUIDs in DrmHalClearkeyFactoryTest.

Test: VTS - VtsHalDrmV1_0TargetTest

bug: 64386897
Change-Id: Id7f140518910a87efdf9eaa19ce16113e206264f
This commit is contained in:
Edwin Wong 2017-08-08 15:31:30 -07:00
parent 07bac60f31
commit 111848cbd0

View file

@ -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));
}