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

Unified Diff: remoting/host/ipc_desktop_environment_unittest.cc

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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/ipc_desktop_environment_unittest.cc
diff --git a/remoting/host/ipc_desktop_environment_unittest.cc b/remoting/host/ipc_desktop_environment_unittest.cc
index 17d29c647d234ba8e4a1a1f71130a6e07fb6df3d..f93e1649267ce1312f7fdf8b1a7db32d6ca6e40e 100644
--- a/remoting/host/ipc_desktop_environment_unittest.cc
+++ b/remoting/host/ipc_desktop_environment_unittest.cc
@@ -129,6 +129,10 @@ class IpcDesktopEnvironmentTest : 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();
@@ -285,6 +289,10 @@ DesktopEnvironment* IpcDesktopEnvironmentTest::CreateDesktopEnvironment() {
.WillRepeatedly(
InvokeWithoutArgs(this,
&IpcDesktopEnvironmentTest::CreateEventExecutor));
+ EXPECT_CALL(*desktop_environment, CreateSessionControllerPtr())
+ .Times(AnyNumber())
+ .WillRepeatedly(InvokeWithoutArgs(
+ this, &IpcDesktopEnvironmentTest::CreateSessionController));
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr(_, _))
.Times(AnyNumber())
.WillRepeatedly(
@@ -305,6 +313,10 @@ EventExecutor* IpcDesktopEnvironmentTest::CreateEventExecutor() {
return remote_event_executor_;
}
+SessionController* IpcDesktopEnvironmentTest::CreateSessionController() {
+ return new MockSessionController();
+}
+
media::ScreenCapturer* IpcDesktopEnvironmentTest::CreateVideoCapturer() {
return new media::ScreenCapturerFake();
}

Powered by Google App Engine
This is Rietveld 408576698