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

Unified Diff: media/cdm/cdm_adapter_unittest.cc

Issue 2655413003: Fix expiry time conversion in ContentDecryptorDelegate (Closed)
Patch Set: Fix expiry time conversion in ContentDecryptorDelegate Created 3 years, 11 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
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/cdm_adapter_unittest.cc
diff --git a/media/cdm/cdm_adapter_unittest.cc b/media/cdm/cdm_adapter_unittest.cc
index 4c467e51d13370a70fda7a00ac4a772de77a72a0..0585ff0561c50944eec6c0d8be5005e2bb5db67a 100644
--- a/media/cdm/cdm_adapter_unittest.cc
+++ b/media/cdm/cdm_adapter_unittest.cc
@@ -30,6 +30,10 @@ MATCHER(IsNotEmpty, "") {
return !arg.empty();
}
+MATCHER(IsNullTime, "") {
+ return arg.is_null();
+}
+
// TODO(jrummell): These tests are a subset of those in aes_decryptor_unittest.
// Refactor aes_decryptor_unittest.cc to handle AesDecryptor directly and
// via CdmAdapter once CdmAdapter supports decrypting functionality. There
@@ -151,6 +155,11 @@ class CdmAdapterTest : public testing::Test {
EXPECT_CALL(cdm_client_, OnSessionKeysChangeCalled(_, _)).Times(0);
}
+ // ClearKeyCdm always call OnSessionExpirationUpdate() for testing purpose.
+ EXPECT_CALL(cdm_client_,
+ OnSessionExpirationUpdate(session_id, IsNullTime()))
+ .Times(1);
+
adapter_->UpdateSession(session_id,
std::vector<uint8_t>(key.begin(), key.end()),
CreatePromise(expected_result));
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698