Index: remoting/host/desktop_process_unittest.cc |
diff --git a/remoting/host/desktop_process_unittest.cc b/remoting/host/desktop_process_unittest.cc |
index de639f100d2e0cbd96e8d72cdf21c04c362f6092..b2dd59e6c6ed7292b09f666a0ab3bb82794359dc 100644 |
--- a/remoting/host/desktop_process_unittest.cc |
+++ b/remoting/host/desktop_process_unittest.cc |
@@ -111,6 +111,10 @@ class DesktopProcessTest : public testing::Test { |
// DesktopEnvironment::CreateEventExecutor(). |
EventExecutor* CreateEventExecutor(); |
+ // Creates a dummy SessionController, to mock |
+ // DesktopEnvironment::CreateSessionController(). |
+ SessionController* CreateSessionController(); |
+ |
// Creates a fake media::ScreenCapturer, to mock |
// DesktopEnvironment::CreateVideoCapturer(). |
media::ScreenCapturer* CreateVideoCapturer(); |
@@ -200,6 +204,11 @@ DesktopEnvironment* DesktopProcessTest::CreateDesktopEnvironment() { |
.Times(AnyNumber()) |
.WillRepeatedly( |
InvokeWithoutArgs(this, &DesktopProcessTest::CreateEventExecutor)); |
+ EXPECT_CALL(*desktop_environment, CreateSessionControllerPtr()) |
+ .Times(AnyNumber()) |
+ .WillRepeatedly( |
+ InvokeWithoutArgs(this, |
+ &DesktopProcessTest::CreateSessionController)); |
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr(_, _)) |
.Times(AnyNumber()) |
.WillRepeatedly( |
@@ -216,6 +225,10 @@ EventExecutor* DesktopProcessTest::CreateEventExecutor() { |
return event_executor; |
} |
+SessionController* DesktopProcessTest::CreateSessionController() { |
+ return new MockSessionController(); |
+} |
+ |
media::ScreenCapturer* DesktopProcessTest::CreateVideoCapturer() { |
return new media::ScreenCapturerFake(); |
} |