Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / remoting / host / chromoting_host_unittest.cc
index 5ebe051..2177dca 100644 (file)
 #include "remoting/host/chromoting_host.h"
 #include "remoting/host/chromoting_host_context.h"
 #include "remoting/host/desktop_environment.h"
+#include "remoting/host/fake_desktop_capturer.h"
+#include "remoting/host/fake_mouse_cursor_monitor.h"
 #include "remoting/host/host_mock_objects.h"
-#include "remoting/host/screen_capturer_fake.h"
-#include "remoting/jingle_glue/mock_objects.h"
 #include "remoting/proto/video.pb.h"
 #include "remoting/protocol/errors.h"
 #include "remoting/protocol/protocol_mock_objects.h"
 #include "remoting/protocol/session_config.h"
+#include "remoting/signaling/mock_signal_strategy.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gmock_mutant.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -195,7 +196,8 @@ class ChromotingHostTest : public testing::Test {
         connection.Pass(),
         desktop_environment_factory_.get(),
         base::TimeDelta(),
-        NULL));
+        NULL,
+        std::vector<HostExtension*>()));
 
     connection_ptr->set_host_stub(client.get());
 
@@ -234,7 +236,7 @@ class ChromotingHostTest : public testing::Test {
     host_->OnSessionRouteChange(get_client(0), channel_name, route);
   }
 
-  // Creates a DesktopEnvironment with a fake webrtc::ScreenCapturer, to mock
+  // Creates a DesktopEnvironment with a fake webrtc::DesktopCapturer, to mock
   // DesktopEnvironmentFactory::Create().
   DesktopEnvironment* CreateDesktopEnvironment() {
     MockDesktopEnvironment* desktop_environment = new MockDesktopEnvironment();
@@ -248,6 +250,9 @@ class ChromotingHostTest : public testing::Test {
     EXPECT_CALL(*desktop_environment, CreateVideoCapturerPtr())
         .Times(AtMost(1))
         .WillOnce(Invoke(this, &ChromotingHostTest::CreateVideoCapturer));
+    EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr())
+        .Times(AtMost(1))
+        .WillOnce(Invoke(this, &ChromotingHostTest::CreateMouseCursorMonitor));
     EXPECT_CALL(*desktop_environment, GetCapabilities())
         .Times(AtMost(1));
     EXPECT_CALL(*desktop_environment, SetCapabilities(_))
@@ -264,10 +269,16 @@ class ChromotingHostTest : public testing::Test {
     return input_injector;
   }
 
-  // Creates a fake webrtc::ScreenCapturer, to mock
+  // Creates a fake webrtc::DesktopCapturer, to mock
   // DesktopEnvironment::CreateVideoCapturer().
-  webrtc::ScreenCapturer* CreateVideoCapturer() {
-    return new ScreenCapturerFake();
+  webrtc::DesktopCapturer* CreateVideoCapturer() {
+    return new FakeDesktopCapturer();
+  }
+
+  // Creates a MockMouseCursorMonitor, to mock
+  // DesktopEnvironment::CreateMouseCursorMonitor().
+  webrtc::MouseCursorMonitor* CreateMouseCursorMonitor() {
+    return new FakeMouseCursorMonitor();
   }
 
   void DisconnectAllClients() {