Index: remoting/host/client_session_unittest.cc |
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc |
index d0e1fc6a0e73b423a5b16fb83a1d9e6366e2a2fc..112afbf34e1d184138763d276ac52986ca8b906f 100644 |
--- a/remoting/host/client_session_unittest.cc |
+++ b/remoting/host/client_session_unittest.cc |
@@ -16,6 +16,7 @@ |
#include "remoting/host/client_session.h" |
#include "remoting/host/desktop_environment.h" |
#include "remoting/host/fake_host_extension.h" |
+#include "remoting/host/fake_mouse_cursor_monitor.h" |
#include "remoting/host/fake_screen_capturer.h" |
#include "remoting/host/host_extension.h" |
#include "remoting/host/host_extension_session.h" |
@@ -146,6 +147,10 @@ class ClientSessionTest : public testing::Test { |
// DesktopEnvironment::CreateVideoCapturer(). |
webrtc::ScreenCapturer* CreateVideoCapturer(); |
+ // Creates a MockMouseCursorMonitor, to mock |
+ // DesktopEnvironment::CreateMouseCursorMonitor |
+ webrtc::MouseCursorMonitor* CreateMouseCursorMonitor(); |
+ |
// Notifies the client session that the client connection has been |
// authenticated and channels have been connected. This effectively enables |
// the input pipe line and starts video capturing. |
@@ -279,6 +284,9 @@ DesktopEnvironment* ClientSessionTest::CreateDesktopEnvironment() { |
.Times(AtMost(1)); |
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr()) |
.WillRepeatedly(Invoke(this, &ClientSessionTest::CreateVideoCapturer)); |
+ EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr()) |
+ .WillRepeatedly( |
+ Invoke(this, &ClientSessionTest::CreateMouseCursorMonitor)); |
EXPECT_CALL(*desktop_environment, GetCapabilities()) |
.Times(AtMost(1)) |
.WillOnce(Return(kDefaultTestCapability)); |
@@ -297,6 +305,10 @@ webrtc::ScreenCapturer* ClientSessionTest::CreateVideoCapturer() { |
return new FakeScreenCapturer(); |
} |
+webrtc::MouseCursorMonitor* ClientSessionTest::CreateMouseCursorMonitor() { |
+ return new FakeMouseCursorMonitor(); |
+} |
+ |
void ClientSessionTest::ConnectClientSession() { |
client_session_->OnConnectionAuthenticated(client_session_->connection()); |
client_session_->OnConnectionChannelsConnected(client_session_->connection()); |