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

Unified Diff: remoting/host/client_session_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/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index 9eb6348c5315d0d2a99fe170d4979f84e8490fc2..a7893a418d75b8fbec21b03e8d910842bcac856c 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -77,6 +77,10 @@ class ClientSessionTest : public testing::Test {
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
+ // Creates a dummy SessionController, to mock
+ // DesktopEnvironment::CreateSessionController().
+ SessionController* CreateSessionController();
+
// Creates a fake media::ScreenCapturer, to mock
// DesktopEnvironment::CreateVideoCapturer().
media::ScreenCapturer* CreateVideoCapturer(
@@ -195,6 +199,8 @@ DesktopEnvironment* ClientSessionTest::CreateDesktopEnvironment() {
.Times(0);
EXPECT_CALL(*desktop_environment, CreateEventExecutorPtr(_, _))
.WillOnce(Invoke(this, &ClientSessionTest::CreateEventExecutor));
+ EXPECT_CALL(*desktop_environment, CreateSessionControllerPtr())
+ .WillOnce(Invoke(this, &ClientSessionTest::CreateSessionController));
EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr(_, _))
.WillOnce(Invoke(this, &ClientSessionTest::CreateVideoCapturer));
@@ -208,6 +214,10 @@ EventExecutor* ClientSessionTest::CreateEventExecutor(
return event_executor_.release();
}
+SessionController* ClientSessionTest::CreateSessionController() {
+ return new MockSessionController();
+}
+
media::ScreenCapturer* ClientSessionTest::CreateVideoCapturer(
scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {

Powered by Google App Engine
This is Rietveld 408576698