Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 111848cb authored by Edwin Wong's avatar Edwin Wong
Browse files

Add test for additional ClearKey UUID.

Test for both ClearKey plugin UUIDs in DrmHalClearkeyFactoryTest.

Test: VTS - VtsHalDrmV1_0TargetTest

bug: 64386897
Change-Id: Id7f140518910a87efdf9eaa19ce16113e206264f
parent 07bac60f
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -76,10 +76,13 @@ 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,
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,
    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));
}