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

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

Issue 1462063004: Move VideoFramePump to remoting/protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/fake_desktop_capturer.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_desktop_capturer.h"
23 #include "remoting/host/host_exit_codes.h" 22 #include "remoting/host/host_exit_codes.h"
24 #include "remoting/host/host_mock_objects.h" 23 #include "remoting/host/host_mock_objects.h"
25 #include "remoting/host/screen_resolution.h" 24 #include "remoting/host/screen_resolution.h"
25 #include "remoting/protocol/fake_desktop_capturer.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;
35 using testing::Return; 35 using testing::Return;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return desktop_environment; 211 return desktop_environment;
212 } 212 }
213 213
214 InputInjector* DesktopProcessTest::CreateInputInjector() { 214 InputInjector* DesktopProcessTest::CreateInputInjector() {
215 MockInputInjector* input_injector = new MockInputInjector(); 215 MockInputInjector* input_injector = new MockInputInjector();
216 EXPECT_CALL(*input_injector, StartPtr(_)); 216 EXPECT_CALL(*input_injector, StartPtr(_));
217 return input_injector; 217 return input_injector;
218 } 218 }
219 219
220 webrtc::DesktopCapturer* DesktopProcessTest::CreateVideoCapturer() { 220 webrtc::DesktopCapturer* DesktopProcessTest::CreateVideoCapturer() {
221 return new FakeDesktopCapturer(); 221 return new protocol::FakeDesktopCapturer();
222 } 222 }
223 223
224 void DesktopProcessTest::DisconnectChannels() { 224 void DesktopProcessTest::DisconnectChannels() {
225 daemon_channel_.reset(); 225 daemon_channel_.reset();
226 network_channel_.reset(); 226 network_channel_.reset();
227 io_task_runner_ = nullptr; 227 io_task_runner_ = nullptr;
228 } 228 }
229 229
230 void DesktopProcessTest::PostDisconnectChannels() { 230 void DesktopProcessTest::PostDisconnectChannels() {
231 message_loop_.PostTask(FROM_HERE, base::Bind( 231 message_loop_.PostTask(FROM_HERE, base::Bind(
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 // Run the desktop process and ask it to crash. 336 // Run the desktop process and ask it to crash.
337 TEST_F(DesktopProcessTest, DeathTest) { 337 TEST_F(DesktopProcessTest, DeathTest) {
338 testing::GTEST_FLAG(death_test_style) = "threadsafe"; 338 testing::GTEST_FLAG(death_test_style) = "threadsafe";
339 339
340 EXPECT_DEATH(RunDeathTest(), ""); 340 EXPECT_DEATH(RunDeathTest(), "");
341 } 341 }
342 342
343 } // namespace remoting 343 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/fake_desktop_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698