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

Side by Side Diff: remoting/host/local_input_monitor_unittest.cc

Issue 14314026: remoting: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/local_input_monitor_linux.cc ('k') | remoting/host/log_to_server_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "remoting/base/auto_thread_task_runner.h" 9 #include "remoting/base/auto_thread_task_runner.h"
10 #include "remoting/host/client_session_control.h" 10 #include "remoting/host/client_session_control.h"
11 #include "remoting/host/host_mock_objects.h" 11 #include "remoting/host/host_mock_objects.h"
12 #include "remoting/host/local_input_monitor.h" 12 #include "remoting/host/local_input_monitor.h"
13 #include "remoting/protocol/protocol_mock_objects.h" 13 #include "remoting/protocol/protocol_mock_objects.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 #include "third_party/skia/include/core/SkPoint.h" 16 #include "third_party/skia/include/core/SkPoint.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 using testing::_; 20 using testing::_;
21 using testing::AnyNumber; 21 using testing::AnyNumber;
22 using testing::ReturnRef; 22 using testing::ReturnRef;
23 23
24 namespace { 24 namespace {
25 25
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 const MessageLoop::Type kDesiredMessageLoopType = MessageLoop::TYPE_UI; 27 const base::MessageLoop::Type kDesiredMessageLoopType =
28 base::MessageLoop::TYPE_UI;
28 #else // !defined(OS_WIN) 29 #else // !defined(OS_WIN)
29 const MessageLoop::Type kDesiredMessageLoopType = MessageLoop::TYPE_IO; 30 const base::MessageLoop::Type kDesiredMessageLoopType =
31 base::MessageLoop::TYPE_IO;
30 #endif // !defined(OS_WIN) 32 #endif // !defined(OS_WIN)
31 33
32 } // namespace 34 } // namespace
33 35
34 class LocalInputMonitorTest : public testing::Test { 36 class LocalInputMonitorTest : public testing::Test {
35 public: 37 public:
36 LocalInputMonitorTest(); 38 LocalInputMonitorTest();
37 39
38 virtual void SetUp() OVERRIDE; 40 virtual void SetUp() OVERRIDE;
39 41
40 MessageLoop message_loop_; 42 base::MessageLoop message_loop_;
41 base::RunLoop run_loop_; 43 base::RunLoop run_loop_;
42 scoped_refptr<AutoThreadTaskRunner> task_runner_; 44 scoped_refptr<AutoThreadTaskRunner> task_runner_;
43 45
44 std::string client_jid_; 46 std::string client_jid_;
45 MockClientSessionControl client_session_control_; 47 MockClientSessionControl client_session_control_;
46 base::WeakPtrFactory<ClientSessionControl> client_session_control_factory_; 48 base::WeakPtrFactory<ClientSessionControl> client_session_control_factory_;
47 }; 49 };
48 50
49 LocalInputMonitorTest::LocalInputMonitorTest() 51 LocalInputMonitorTest::LocalInputMonitorTest()
50 : message_loop_(kDesiredMessageLoopType), 52 : message_loop_(kDesiredMessageLoopType),
(...skipping 28 matching lines...) Expand all
79 task_runner_, 81 task_runner_,
80 task_runner_, 82 task_runner_,
81 client_session_control_factory_.GetWeakPtr()); 83 client_session_control_factory_.GetWeakPtr());
82 task_runner_ = NULL; 84 task_runner_ = NULL;
83 } 85 }
84 86
85 run_loop_.Run(); 87 run_loop_.Run();
86 } 88 }
87 89
88 } // namespace remoting 90 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_linux.cc ('k') | remoting/host/log_to_server_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698