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

Side by Side Diff: remoting/host/ipc_desktop_environment_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/host_status_monitor_fake.h ('k') | remoting/host/screen_capturer_fake.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/process/process.h" 11 #include "base/process/process.h"
12 #include "base/process/process_handle.h" 12 #include "base/process/process_handle.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.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 "ipc/ipc_platform_file.h" 18 #include "ipc/ipc_platform_file.h"
19 #include "remoting/base/auto_thread.h" 19 #include "remoting/base/auto_thread.h"
20 #include "remoting/base/auto_thread_task_runner.h" 20 #include "remoting/base/auto_thread_task_runner.h"
21 #include "remoting/base/constants.h" 21 #include "remoting/base/constants.h"
22 #include "remoting/host/chromoting_messages.h" 22 #include "remoting/host/chromoting_messages.h"
23 #include "remoting/host/desktop_process.h" 23 #include "remoting/host/desktop_process.h"
24 #include "remoting/host/desktop_session.h" 24 #include "remoting/host/desktop_session.h"
25 #include "remoting/host/desktop_session_connector.h" 25 #include "remoting/host/desktop_session_connector.h"
26 #include "remoting/host/desktop_session_proxy.h" 26 #include "remoting/host/desktop_session_proxy.h"
27 #include "remoting/host/fake_screen_capturer.h"
27 #include "remoting/host/host_mock_objects.h" 28 #include "remoting/host/host_mock_objects.h"
28 #include "remoting/host/ipc_desktop_environment.h" 29 #include "remoting/host/ipc_desktop_environment.h"
29 #include "remoting/host/screen_capturer_fake.h"
30 #include "remoting/protocol/protocol_mock_objects.h" 30 #include "remoting/protocol/protocol_mock_objects.h"
31 #include "testing/gmock/include/gmock/gmock.h" 31 #include "testing/gmock/include/gmock/gmock.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 33 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
34 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" 34 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
35 #include "third_party/webrtc/modules/desktop_capture/screen_capturer_mock_object s.h" 35 #include "third_party/webrtc/modules/desktop_capture/screen_capturer_mock_object s.h"
36 36
37 using testing::_; 37 using testing::_;
38 using testing::AnyNumber; 38 using testing::AnyNumber;
39 using testing::AtLeast; 39 using testing::AtLeast;
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 337
338 InputInjector* IpcDesktopEnvironmentTest::CreateInputInjector() { 338 InputInjector* IpcDesktopEnvironmentTest::CreateInputInjector() {
339 EXPECT_TRUE(remote_input_injector_ == NULL); 339 EXPECT_TRUE(remote_input_injector_ == NULL);
340 remote_input_injector_ = new testing::StrictMock<MockInputInjector>(); 340 remote_input_injector_ = new testing::StrictMock<MockInputInjector>();
341 341
342 EXPECT_CALL(*remote_input_injector_, StartPtr(_)); 342 EXPECT_CALL(*remote_input_injector_, StartPtr(_));
343 return remote_input_injector_; 343 return remote_input_injector_;
344 } 344 }
345 345
346 webrtc::ScreenCapturer* IpcDesktopEnvironmentTest::CreateVideoCapturer() { 346 webrtc::ScreenCapturer* IpcDesktopEnvironmentTest::CreateVideoCapturer() {
347 return new ScreenCapturerFake(); 347 return new FakeScreenCapturer();
348 } 348 }
349 349
350 void IpcDesktopEnvironmentTest::DeleteDesktopEnvironment() { 350 void IpcDesktopEnvironmentTest::DeleteDesktopEnvironment() {
351 input_injector_.reset(); 351 input_injector_.reset();
352 screen_controls_.reset(); 352 screen_controls_.reset();
353 video_capturer_.reset(); 353 video_capturer_.reset();
354 354
355 // Trigger DisconnectTerminal(). 355 // Trigger DisconnectTerminal().
356 desktop_environment_.reset(); 356 desktop_environment_.reset();
357 } 357 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 screen_controls_->SetScreenResolution(ScreenResolution( 642 screen_controls_->SetScreenResolution(ScreenResolution(
643 webrtc::DesktopSize(100, 100), 643 webrtc::DesktopSize(100, 100),
644 webrtc::DesktopVector(96, 96))); 644 webrtc::DesktopVector(96, 96)));
645 645
646 task_runner_ = NULL; 646 task_runner_ = NULL;
647 io_task_runner_ = NULL; 647 io_task_runner_ = NULL;
648 main_run_loop_.Run(); 648 main_run_loop_.Run();
649 } 649 }
650 650
651 } // namespace remoting 651 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_status_monitor_fake.h ('k') | remoting/host/screen_capturer_fake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698