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

Unified Diff: media/cdm/aes_decryptor_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 | « content/renderer/pepper/content_decryptor_delegate.cc ('k') | media/cdm/cdm_adapter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/aes_decryptor_unittest.cc
diff --git a/media/cdm/aes_decryptor_unittest.cc b/media/cdm/aes_decryptor_unittest.cc
index cf9ed149337e4bedc29670cc1224a5b313fa408d..e5761903e9a56822d64b55ce6eda41f48e786604 100644
--- a/media/cdm/aes_decryptor_unittest.cc
+++ b/media/cdm/aes_decryptor_unittest.cc
@@ -35,6 +35,7 @@
#include "url/gurl.h"
using ::testing::_;
+using ::testing::AtMost;
using ::testing::Gt;
using ::testing::IsNull;
using ::testing::NotNull;
@@ -52,6 +53,9 @@ MATCHER(IsJSONDictionary, "") {
std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(result));
return (root.get() && root->GetType() == base::Value::Type::DICTIONARY);
}
+MATCHER(IsNullTime, "") {
+ return arg.is_null();
+}
namespace media {
@@ -364,6 +368,12 @@ class AesDecryptorTest : public testing::TestWithParam<std::string> {
EXPECT_CALL(cdm_client_, OnSessionKeysChangeCalled(_, _)).Times(0);
}
+ // AesDecryptor never calls OnSessionExpirationUpdate() since Clear Key key
+ // system doesn't need it. But ClearKeyCdm does call it for testing purpose.
+ EXPECT_CALL(cdm_client_,
+ OnSessionExpirationUpdate(session_id, IsNullTime()))
+ .Times(AtMost(1));
+
cdm_->UpdateSession(session_id,
std::vector<uint8_t>(key.begin(), key.end()),
CreatePromise(expected_result));
« no previous file with comments | « content/renderer/pepper/content_decryptor_delegate.cc ('k') | media/cdm/cdm_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698