Index: remoting/host/screen_recorder_unittest.cc |
diff --git a/remoting/host/screen_recorder_unittest.cc b/remoting/host/screen_recorder_unittest.cc |
index 05c0904e4467ecaad7d2abeb59e81e99e7ba57a8..c2a78a2f3af81beac23edb0cc56cd5918c63a073 100644 |
--- a/remoting/host/screen_recorder_unittest.cc |
+++ b/remoting/host/screen_recorder_unittest.cc |
@@ -17,6 +17,7 @@ |
using ::remoting::protocol::MockConnectionToClient; |
using ::remoting::protocol::MockConnectionToClientEventHandler; |
using ::remoting::protocol::MockHostStub; |
+using ::remoting::protocol::MockSession; |
using ::remoting::protocol::MockVideoStub; |
using ::testing::_; |
@@ -77,8 +78,11 @@ class ScreenRecorderTest : public testing::Test { |
// Capturer and Encoder are owned by ScreenRecorder. |
encoder_ = new MockEncoder(); |
+ session_ = new MockSession(); |
+ EXPECT_CALL(*session_, SetStateChangeCallback(_)); |
connection_ = new MockConnectionToClient( |
- &handler_, &host_stub_, &event_executor_); |
+ session_, &host_stub_, &event_executor_); |
+ connection_->SetEventHandler(&handler_); |
record_ = new ScreenRecorder( |
&message_loop_, &message_loop_, |
@@ -92,6 +96,7 @@ class ScreenRecorderTest : public testing::Test { |
MockConnectionToClientEventHandler handler_; |
MockHostStub host_stub_; |
MockEventExecutor event_executor_; |
+ MockSession* session_; // Owned by |connection_|. |
scoped_refptr<MockConnectionToClient> connection_; |
// The following mock objects are owned by ScreenRecorder. |