Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1141)

Unified Diff: media/cdm/aes_decryptor_unittest.cc

Issue 2831963003: EME: Allow temporary sessions to be removed for ClearKey only. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cdm/aes_decryptor_unittest.cc
diff --git a/media/cdm/aes_decryptor_unittest.cc b/media/cdm/aes_decryptor_unittest.cc
index 5e80c79a8b43c8d6655dba6bc04e2618f7b9f542..8537c9c2eff76c38a52de5dbe96e3965db830380 100644
--- a/media/cdm/aes_decryptor_unittest.cc
+++ b/media/cdm/aes_decryptor_unittest.cc
@@ -252,6 +252,8 @@ class AesDecryptorTest : public testing::TestWithParam<std::string> {
base::Bind(&MockCdmClient::OnSessionClosed,
base::Unretained(&cdm_client_)),
base::Bind(&MockCdmClient::OnSessionKeysChange,
+ base::Unretained(&cdm_client_)),
+ base::Bind(&MockCdmClient::OnSessionExpirationUpdate,
base::Unretained(&cdm_client_))),
std::string());
} else if (GetParam() == "CdmAdapter") {
@@ -348,10 +350,12 @@ class AesDecryptorTest : public testing::TestWithParam<std::string> {
cdm_->CloseSession(session_id, CreatePromise(RESOLVED));
}
- // Only persistent sessions can be removed.
+ // Removes the session specified by |session_id|.
void RemoveSession(const std::string& session_id) {
- // TODO(ddorwin): This should be RESOLVED after https://crbug.com/616166.
- cdm_->RemoveSession(session_id, CreatePromise(REJECTED));
+ EXPECT_CALL(cdm_client_, OnSessionKeysChangeCalled(session_id, false));
+ EXPECT_CALL(cdm_client_,
+ OnSessionExpirationUpdate(session_id, IsNullTime()));
+ cdm_->RemoveSession(session_id, CreatePromise(RESOLVED));
}
// Updates the session specified by |session_id| with |key|. |result|

Powered by Google App Engine
This is Rietveld 408576698