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

Unified Diff: media/cdm/aes_decryptor_unittest.cc

Issue 297703002: Using GURL in place of std::string for destination_url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.h » ('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 39a5036cb70a8327cb315ea8243f8d87b9b954fc..3339fc5166e57fb5bbe32f6c03207fac419f5d39 100644
--- a/media/cdm/aes_decryptor_unittest.cc
+++ b/media/cdm/aes_decryptor_unittest.cc
@@ -23,6 +23,8 @@ using ::testing::StrNe;
MATCHER(IsEmpty, "") { return arg.empty(); }
+class GURL;
+
namespace media {
const uint8 kOriginalData[] = "Original subsample data.";
@@ -226,7 +228,7 @@ class AesDecryptorTest : public testing::Test {
DCHECK(!key_id.empty());
uint32 session_id = next_session_id_++;
EXPECT_CALL(*this, OnSessionCreated(session_id, StrNe(std::string())));
- EXPECT_CALL(*this, OnSessionMessage(session_id, key_id, ""));
+ EXPECT_CALL(*this, OnSessionMessage(session_id, key_id, GURL::EmptyGURL()));
EXPECT_TRUE(decryptor_.CreateSession(
session_id, std::string(), &key_id[0], key_id.size()));
return session_id;
@@ -328,7 +330,7 @@ class AesDecryptorTest : public testing::Test {
MOCK_METHOD3(OnSessionMessage,
void(uint32 session_id,
const std::vector<uint8>& message,
- const std::string& default_url));
+ const GURL& default_url));
MOCK_METHOD1(OnSessionReady, void(uint32 session_id));
MOCK_METHOD1(OnSessionClosed, void(uint32 session_id));
MOCK_METHOD3(OnSessionError,
@@ -354,24 +356,28 @@ class AesDecryptorTest : public testing::Test {
TEST_F(AesDecryptorTest, CreateSessionWithNullInitData) {
uint32 session_id = 8;
- EXPECT_CALL(*this, OnSessionMessage(session_id, IsEmpty(), ""));
+ EXPECT_CALL(*this,
+ OnSessionMessage(session_id, IsEmpty(), GURL::EmptyGURL()));
EXPECT_CALL(*this, OnSessionCreated(session_id, StrNe(std::string())));
EXPECT_TRUE(decryptor_.CreateSession(session_id, std::string(), NULL, 0));
}
TEST_F(AesDecryptorTest, MultipleCreateSession) {
uint32 session_id1 = 10;
- EXPECT_CALL(*this, OnSessionMessage(session_id1, IsEmpty(), ""));
+ EXPECT_CALL(*this,
+ OnSessionMessage(session_id1, IsEmpty(), GURL::EmptyGURL()));
EXPECT_CALL(*this, OnSessionCreated(session_id1, StrNe(std::string())));
EXPECT_TRUE(decryptor_.CreateSession(session_id1, std::string(), NULL, 0));
uint32 session_id2 = 11;
- EXPECT_CALL(*this, OnSessionMessage(session_id2, IsEmpty(), ""));
+ EXPECT_CALL(*this,
+ OnSessionMessage(session_id2, IsEmpty(), GURL::EmptyGURL()));
EXPECT_CALL(*this, OnSessionCreated(session_id2, StrNe(std::string())));
EXPECT_TRUE(decryptor_.CreateSession(session_id2, std::string(), NULL, 0));
uint32 session_id3 = 23;
- EXPECT_CALL(*this, OnSessionMessage(session_id3, IsEmpty(), ""));
+ EXPECT_CALL(*this,
+ OnSessionMessage(session_id3, IsEmpty(), GURL::EmptyGURL()));
EXPECT_CALL(*this, OnSessionCreated(session_id3, StrNe(std::string())));
EXPECT_TRUE(decryptor_.CreateSession(session_id3, std::string(), NULL, 0));
}
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/cdm/ppapi/external_clear_key/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698