Fix expiry time overflow if it is unlimited
Bug: 21324836 Merged from Widevine CDM repo: https://widevine-internal-review.googlesource.com/#/c/14392 Change-Id: I2a8da14c98f8ae0fece3667b6f6b8517577f8a98
This commit is contained in:
@@ -1328,6 +1328,11 @@ TEST_F(WVDrmPluginTest, MarshalsEvents) {
|
||||
sendEvent(DrmPlugin::kDrmPluginEventKeyNeeded, 0,
|
||||
Pointee(ElementsAreArray(sessionIdRaw, kSessionIdSize)),
|
||||
NULL));
|
||||
// Expiry Time in Java API is in milliseconds.
|
||||
EXPECT_CALL(*listener,
|
||||
sendExpirationUpdate(
|
||||
Pointee(ElementsAreArray(sessionIdRaw, kSessionIdSize)),
|
||||
NEVER_EXPIRES));
|
||||
EXPECT_CALL(*listener,
|
||||
sendExpirationUpdate(
|
||||
Pointee(ElementsAreArray(sessionIdRaw, kSessionIdSize)),
|
||||
@@ -1364,6 +1369,7 @@ TEST_F(WVDrmPluginTest, MarshalsEvents) {
|
||||
plugin.OnSessionKeysChange(cdmSessionId, cdmKeysStatus, false);
|
||||
|
||||
plugin.OnSessionRenewalNeeded(cdmSessionId);
|
||||
plugin.OnExpirationUpdate(cdmSessionId, NEVER_EXPIRES);
|
||||
plugin.OnExpirationUpdate(cdmSessionId, kExpiryTimeInSeconds);
|
||||
|
||||
cdmKeysStatus[kKeyId1] = kKeyStatusUsable;
|
||||
|
||||
Reference in New Issue
Block a user