Merge "Start playback timer in integration tests" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-27 03:43:30 +00:00
committed by Android (Google) Code Review

View File

@@ -6233,6 +6233,9 @@ TEST_F(WvCdmRequestLicenseRollbackTest, Streaming_ExpireBeforeRollback) {
GenerateKeyRequest(init_data_with_expiry_, kLicenseTypeStreaming);
VerifyKeyRequestResponse(config_.license_server(), config_.client_auth());
// Start playback timer.
EXPECT_EQ(NO_ERROR, Decrypt(session_id_));
// Elapse time so that the key should now be considered expired.
std::this_thread::sleep_for(
std::chrono::milliseconds(kExpirationWithWindowMs_));
@@ -6319,6 +6322,9 @@ TEST_F(WvCdmRequestLicenseRollbackTest,
nullptr, &session_id_);
EXPECT_EQ(wvcdm::KEY_ADDED, decryptor_->RestoreKey(session_id_, key_set_id));
// Start playback timer.
EXPECT_EQ(NO_ERROR, Decrypt(session_id_));
RollbackSystemTime(kExpirationWithWindowMs_);
// Elapse time so that the key should now be considered expired.
@@ -6357,6 +6363,9 @@ TEST_F(WvCdmRequestLicenseRollbackTest,
nullptr, &session_id_);
EXPECT_EQ(wvcdm::KEY_ADDED, decryptor_->RestoreKey(session_id_, key_set_id));
// Start playback timer.
EXPECT_EQ(NO_ERROR, Decrypt(session_id_));
// Elapse time so that the key should now be considered expired.
std::this_thread::sleep_for(
std::chrono::milliseconds(kExpirationWithWindowMs_));