Index: remoting/host/desktop_process_unittest.cc |
diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc |
index 55aac14bbf70f21d4341c976f7a4d7cf9a9ec2ac..97d0249d803218a851c593c8d0090d3bbbfefa05 100644 |
--- a/remoting/host/desktop_process_unittest.cc |
+++ b/remoting/host/desktop_process_unittest.cc |
@@ -25,6 +25,7 @@ |
#include "remoting/base/auto_thread_task_runner.h" |
#include "remoting/host/chromoting_messages.h" |
#include "remoting/host/desktop_process.h" |
+#include "remoting/host/fake_mouse_cursor_monitor.h" |
#include "remoting/host/host_exit_codes.h" |
#include "remoting/host/host_mock_objects.h" |
#include "remoting/host/screen_resolution.h" |
@@ -123,6 +124,10 @@ class DesktopProcessTest : public testing::Test { |
// DesktopEnvironment::CreateVideoCapturer(). |
webrtc::DesktopCapturer* CreateVideoCapturer(); |
+ // Creates a fake webrtc::MouseCursorMonitor, to mock |
+ // DesktopEnvironment::CreateMouseCursorMonitor(). |
+ webrtc::MouseCursorMonitor* CreateMouseCursorMonitor(); |
+ |
// Disconnects the daemon-to-desktop channel causing the desktop process to |
// exit. |
void DisconnectChannels(); |
@@ -207,6 +212,9 @@ DesktopEnvironment* DesktopProcessTest::CreateDesktopEnvironment() { |
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr()) |
.Times(AtMost(1)) |
.WillOnce(Invoke(this, &DesktopProcessTest::CreateVideoCapturer)); |
+ EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr()) |
+ .Times(AtMost(1)) |
+ .WillOnce(Invoke(this, &DesktopProcessTest::CreateMouseCursorMonitor)); |
EXPECT_CALL(*desktop_environment, GetCapabilities()) |
.Times(AtMost(1)); |
EXPECT_CALL(*desktop_environment, SetCapabilities(_)) |
@@ -227,6 +235,10 @@ webrtc::DesktopCapturer* DesktopProcessTest::CreateVideoCapturer() { |
return new protocol::FakeDesktopCapturer(); |
} |
+webrtc::MouseCursorMonitor* DesktopProcessTest::CreateMouseCursorMonitor() { |
+ return new FakeMouseCursorMonitor(); |
+} |
+ |
void DesktopProcessTest::DisconnectChannels() { |
daemon_channel_.reset(); |
network_channel_.reset(); |