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

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

Issue 2104363004: Remove remaining calls to deprecated MessageLoop methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR gab Created 4 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
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/protocol/authenticator_test_base.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 "remoting/host/ipc_desktop_environment.h" 5 #include "remoting/host/ipc_desktop_environment.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/process/process.h" 18 #include "base/process/process.h"
19 #include "base/process/process_handle.h" 19 #include "base/process/process_handle.h"
20 #include "base/run_loop.h" 20 #include "base/run_loop.h"
21 #include "base/single_thread_task_runner.h"
21 #include "build/build_config.h" 22 #include "build/build_config.h"
22 #include "ipc/attachment_broker_privileged.h" 23 #include "ipc/attachment_broker_privileged.h"
23 #include "ipc/ipc_channel.h" 24 #include "ipc/ipc_channel.h"
24 #include "ipc/ipc_channel_proxy.h" 25 #include "ipc/ipc_channel_proxy.h"
25 #include "ipc/ipc_listener.h" 26 #include "ipc/ipc_listener.h"
26 #include "ipc/ipc_message.h" 27 #include "ipc/ipc_message.h"
27 #include "ipc/ipc_platform_file.h" 28 #include "ipc/ipc_platform_file.h"
28 #include "remoting/base/auto_thread.h" 29 #include "remoting/base/auto_thread.h"
29 #include "remoting/base/auto_thread_task_runner.h" 30 #include "remoting/base/auto_thread_task_runner.h"
30 #include "remoting/base/constants.h" 31 #include "remoting/base/constants.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr()) 368 EXPECT_CALL(*desktop_environment, CreateMouseCursorMonitorPtr())
368 .Times(AtMost(1)) 369 .Times(AtMost(1))
369 .WillOnce(Invoke( 370 .WillOnce(Invoke(
370 this, &IpcDesktopEnvironmentTest::CreateMouseCursorMonitor)); 371 this, &IpcDesktopEnvironmentTest::CreateMouseCursorMonitor));
371 EXPECT_CALL(*desktop_environment, GetCapabilities()) 372 EXPECT_CALL(*desktop_environment, GetCapabilities())
372 .Times(AtMost(1)); 373 .Times(AtMost(1));
373 EXPECT_CALL(*desktop_environment, SetCapabilities(_)) 374 EXPECT_CALL(*desktop_environment, SetCapabilities(_))
374 .Times(AtMost(1)); 375 .Times(AtMost(1));
375 376
376 // Let tests know that the remote desktop environment is created. 377 // Let tests know that the remote desktop environment is created.
377 message_loop_.PostTask(FROM_HERE, setup_run_loop_->QuitClosure()); 378 message_loop_.task_runner()->PostTask(FROM_HERE,
379 setup_run_loop_->QuitClosure());
378 380
379 return desktop_environment; 381 return desktop_environment;
380 } 382 }
381 383
382 InputInjector* IpcDesktopEnvironmentTest::CreateInputInjector() { 384 InputInjector* IpcDesktopEnvironmentTest::CreateInputInjector() {
383 EXPECT_TRUE(remote_input_injector_ == nullptr); 385 EXPECT_TRUE(remote_input_injector_ == nullptr);
384 remote_input_injector_ = new testing::StrictMock<MockInputInjector>(); 386 remote_input_injector_ = new testing::StrictMock<MockInputInjector>();
385 387
386 EXPECT_CALL(*remote_input_injector_, StartPtr(_)); 388 EXPECT_CALL(*remote_input_injector_, StartPtr(_));
387 return remote_input_injector_; 389 return remote_input_injector_;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 .WillOnce(InvokeWithoutArgs( 756 .WillOnce(InvokeWithoutArgs(
755 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment)); 757 this, &IpcDesktopEnvironmentTest::DeleteDesktopEnvironment));
756 758
757 // Change the desktop resolution. 759 // Change the desktop resolution.
758 screen_controls_->SetScreenResolution(ScreenResolution( 760 screen_controls_->SetScreenResolution(ScreenResolution(
759 webrtc::DesktopSize(100, 100), 761 webrtc::DesktopSize(100, 100),
760 webrtc::DesktopVector(96, 96))); 762 webrtc::DesktopVector(96, 96)));
761 } 763 }
762 764
763 } // namespace remoting 765 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_unittest.cc ('k') | remoting/protocol/authenticator_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698