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

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

Issue 393703002: Rename *Fake to Fake* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 6 years, 5 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/client_session_unittest.cc ('k') | remoting/host/fake_host_status_monitor.h » ('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 "remoting/host/desktop_process.h" 5 #include "remoting/host/desktop_process.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "ipc/ipc_channel.h" 14 #include "ipc/ipc_channel.h"
15 #include "ipc/ipc_channel_proxy.h" 15 #include "ipc/ipc_channel_proxy.h"
16 #include "ipc/ipc_listener.h" 16 #include "ipc/ipc_listener.h"
17 #include "ipc/ipc_message.h" 17 #include "ipc/ipc_message.h"
18 #include "remoting/base/auto_thread.h" 18 #include "remoting/base/auto_thread.h"
19 #include "remoting/base/auto_thread_task_runner.h" 19 #include "remoting/base/auto_thread_task_runner.h"
20 #include "remoting/host/chromoting_messages.h" 20 #include "remoting/host/chromoting_messages.h"
21 #include "remoting/host/desktop_process.h" 21 #include "remoting/host/desktop_process.h"
22 #include "remoting/host/fake_screen_capturer.h"
22 #include "remoting/host/host_exit_codes.h" 23 #include "remoting/host/host_exit_codes.h"
23 #include "remoting/host/host_mock_objects.h" 24 #include "remoting/host/host_mock_objects.h"
24 #include "remoting/host/screen_capturer_fake.h"
25 #include "remoting/host/screen_resolution.h" 25 #include "remoting/host/screen_resolution.h"
26 #include "remoting/protocol/protocol_mock_objects.h" 26 #include "remoting/protocol/protocol_mock_objects.h"
27 #include "testing/gmock/include/gmock/gmock.h" 27 #include "testing/gmock/include/gmock/gmock.h"
28 #include "testing/gmock_mutant.h" 28 #include "testing/gmock_mutant.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 30
31 using testing::_; 31 using testing::_;
32 using testing::AnyNumber; 32 using testing::AnyNumber;
33 using testing::AtMost; 33 using testing::AtMost;
34 using testing::InSequence; 34 using testing::InSequence;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return desktop_environment; 212 return desktop_environment;
213 } 213 }
214 214
215 InputInjector* DesktopProcessTest::CreateInputInjector() { 215 InputInjector* DesktopProcessTest::CreateInputInjector() {
216 MockInputInjector* input_injector = new MockInputInjector(); 216 MockInputInjector* input_injector = new MockInputInjector();
217 EXPECT_CALL(*input_injector, StartPtr(_)); 217 EXPECT_CALL(*input_injector, StartPtr(_));
218 return input_injector; 218 return input_injector;
219 } 219 }
220 220
221 webrtc::ScreenCapturer* DesktopProcessTest::CreateVideoCapturer() { 221 webrtc::ScreenCapturer* DesktopProcessTest::CreateVideoCapturer() {
222 return new ScreenCapturerFake(); 222 return new FakeScreenCapturer();
223 } 223 }
224 224
225 void DesktopProcessTest::DisconnectChannels() { 225 void DesktopProcessTest::DisconnectChannels() {
226 daemon_channel_.reset(); 226 daemon_channel_.reset();
227 network_channel_.reset(); 227 network_channel_.reset();
228 io_task_runner_ = NULL; 228 io_task_runner_ = NULL;
229 } 229 }
230 230
231 void DesktopProcessTest::PostDisconnectChannels() { 231 void DesktopProcessTest::PostDisconnectChannels() {
232 message_loop_.PostTask(FROM_HERE, base::Bind( 232 message_loop_.PostTask(FROM_HERE, base::Bind(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 // Run the desktop process and ask it to crash. 339 // Run the desktop process and ask it to crash.
340 TEST_F(DesktopProcessTest, DeathTest) { 340 TEST_F(DesktopProcessTest, DeathTest) {
341 testing::GTEST_FLAG(death_test_style) = "threadsafe"; 341 testing::GTEST_FLAG(death_test_style) = "threadsafe";
342 342
343 EXPECT_DEATH(RunDeathTest(), ""); 343 EXPECT_DEATH(RunDeathTest(), "");
344 } 344 }
345 345
346 } // namespace remoting 346 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/fake_host_status_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698