Add CdmKeyStatus kKeyStatusUsableInFuture

Bug: 116738851
Test: unit tests
Change-Id: I49728788e57905806b72e891f3654fbf0c8b1bc0
This commit is contained in:
Robert Shih
2019-05-10 13:29:54 -07:00
parent 127f87770c
commit 69c8f488ca
10 changed files with 105 additions and 29 deletions

View File

@@ -1407,6 +1407,7 @@ TEST_F(WVDrmPluginTest, MarshalsEvents) {
const char kKeyId2[] = "Testing Key2 Id ";
const char kKeyId3[] = "Testing Key3 Id ";
const char kKeyId4[] = "Testing Key4 Id ";
const char kKeyId5[] = "Testing Key5 Id ";
{
InSequence calls;
@@ -1459,7 +1460,11 @@ TEST_F(WVDrmPluginTest, MarshalsEvents) {
AllOf(Field(&DrmPlugin::KeyStatus::mKeyId,
ElementsAreArray(kKeyId4, sizeof(kKeyId4) - 1)),
Field(&DrmPlugin::KeyStatus::mType,
DrmPlugin::kKeyStatusType_StatusPending)))),
DrmPlugin::kKeyStatusType_StatusPending)),
AllOf(Field(&DrmPlugin::KeyStatus::mKeyId,
ElementsAreArray(kKeyId5, sizeof(kKeyId5) - 1)),
Field(&DrmPlugin::KeyStatus::mType,
DrmPlugin::kKeyStatusType_UsableInFuture)))),
true));
}
@@ -1478,6 +1483,7 @@ TEST_F(WVDrmPluginTest, MarshalsEvents) {
cdmKeysStatus[kKeyId2] = kKeyStatusOutputNotAllowed;
cdmKeysStatus[kKeyId3] = kKeyStatusInternalError;
cdmKeysStatus[kKeyId4] = kKeyStatusPending;
cdmKeysStatus[kKeyId5] = kKeyStatusUsableInFuture;
plugin.OnSessionKeysChange(cdmSessionId, cdmKeysStatus, true);
}