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

Unified Diff: remoting/host/client_session_unittest.cc

Issue 1460593005: Make protocol::ConnectionToClient an abstract interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: remoting/host/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index 81a3b6f0bf42c7fc93ff4b3278954f71744adc31..780c24f827f18322ac952e2ad05a771d6cb77994 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -226,16 +226,14 @@ void ClientSessionTest::TearDown() {
void ClientSessionTest::CreateClientSession() {
// Mock protocol::Session APIs called directly by ClientSession.
- protocol::MockSession* session = new MockSession();
+ scoped_ptr<protocol::MockSession> session(new MockSession());
EXPECT_CALL(*session, config()).WillRepeatedly(ReturnRef(*session_config_));
EXPECT_CALL(*session, jid()).WillRepeatedly(ReturnRef(client_jid_));
- EXPECT_CALL(*session, SetEventHandler(_));
// Mock protocol::ConnectionToClient APIs called directly by ClientSession.
// HostStub is not touched by ClientSession, so we can safely pass nullptr.
scoped_ptr<MockConnectionToClient> connection(
- new MockConnectionToClient(session, nullptr));
- EXPECT_CALL(*connection, session()).WillRepeatedly(Return(session));
+ new MockConnectionToClient(session.Pass(), nullptr));
EXPECT_CALL(*connection, client_stub())
.WillRepeatedly(Return(&client_stub_));
EXPECT_CALL(*connection, video_stub()).WillRepeatedly(Return(&video_stub_));

Powered by Google App Engine
This is Rietveld 408576698