| Index: remoting/host/local_input_monitor_unittest.cc
|
| diff --git a/remoting/host/local_input_monitor_unittest.cc b/remoting/host/local_input_monitor_unittest.cc
|
| index a3c18361b17baeb0374d638e9880050297f39735..da044511651da7ce9f3b2a6daba82c0e5ee87e3c 100644
|
| --- a/remoting/host/local_input_monitor_unittest.cc
|
| +++ b/remoting/host/local_input_monitor_unittest.cc
|
| @@ -8,7 +8,6 @@
|
| #include "base/run_loop.h"
|
| #include "remoting/base/auto_thread_task_runner.h"
|
| #include "remoting/host/local_input_monitor.h"
|
| -#include "remoting/host/mouse_move_observer.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/skia/include/core/SkPoint.h"
|
| @@ -26,14 +25,14 @@ const MessageLoop::Type kDesiredMessageLoopType = MessageLoop::TYPE_UI;
|
| const MessageLoop::Type kDesiredMessageLoopType = MessageLoop::TYPE_IO;
|
| #endif // !defined(OS_WIN)
|
|
|
| -class FakeMouseMoveObserver : public MouseMoveObserver {
|
| +class FakeDelegate : public SessionController::Delegate {
|
| public:
|
| - FakeMouseMoveObserver() {}
|
| - virtual ~FakeMouseMoveObserver() {}
|
| + FakeDelegate() {}
|
| + virtual ~FakeDelegate() {}
|
|
|
| - // Ignore mouse events to avoid breaking the test of someone moves the mouse.
|
| - virtual void OnLocalMouseMoved(const SkIPoint&) OVERRIDE {}
|
| - void OnDisconnectCallback() {}
|
| + // Ignore all callbacks.
|
| + virtual void DisconnectSession() OVERRIDE {}
|
| + virtual void OnLocalMouseMoved(const SkIPoint& position) OVERRIDE {}
|
| };
|
|
|
| } // namespace
|
| @@ -53,7 +52,7 @@ class LocalInputMonitorTest : public testing::Test {
|
| base::RunLoop run_loop_;
|
| scoped_refptr<AutoThreadTaskRunner> task_runner_;
|
|
|
| - FakeMouseMoveObserver mouse_move_observer_;
|
| + FakeDelegate fake_delegate_;
|
| };
|
|
|
| // This test is really to exercise only the creation and destruction code in
|
| @@ -61,14 +60,9 @@ class LocalInputMonitorTest : public testing::Test {
|
| TEST_F(LocalInputMonitorTest, Basic) {
|
| {
|
| scoped_ptr<LocalInputMonitor> local_input_monitor =
|
| - LocalInputMonitor::Create(task_runner_, task_runner_, task_runner_);
|
| + LocalInputMonitor::Create(task_runner_, task_runner_, task_runner_,
|
| + &fake_delegate_);
|
| task_runner_ = NULL;
|
| -
|
| - local_input_monitor->Start(
|
| - &mouse_move_observer_,
|
| - base::Bind(&FakeMouseMoveObserver::OnDisconnectCallback,
|
| - base::Unretained(&mouse_move_observer_)));
|
| - local_input_monitor->Stop();
|
| }
|
|
|
| run_loop_.Run();
|
|
|