X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fremoting%2Fhost%2Fchromoting_host_unittest.cc;h=2177dca8ddad6dffa0f5a2c86f7b81810473d0b0;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=5ebe0513f43eb479d4240f1360a26a6c1cbf53fd;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/remoting/host/chromoting_host_unittest.cc b/src/remoting/host/chromoting_host_unittest.cc index 5ebe051..2177dca 100644 --- a/src/remoting/host/chromoting_host_unittest.cc +++ b/src/remoting/host/chromoting_host_unittest.cc @@ -11,13 +11,14 @@ #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())); 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() {