am ce68b8ee: Fix expiry time overflow if it is unlimited

* commit 'ce68b8ee8835cd202e40a2d1246023dcd22fcc05':
  Fix expiry time overflow if it is unlimited
This commit is contained in:
Kongqun Yang
2015-05-21 19:10:18 +00:00
committed by Android Git Automerger
9 changed files with 25 additions and 15 deletions

View File

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