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

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

Issue 1549493004: Use std::move() instead of .Pass() in remoting/host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass
Patch Set: Created 5 years 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
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"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 new MockDesktopEnvironmentFactory()); 253 new MockDesktopEnvironmentFactory());
254 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) 254 EXPECT_CALL(*desktop_environment_factory, CreatePtr())
255 .Times(AnyNumber()) 255 .Times(AnyNumber())
256 .WillRepeatedly(Invoke(this, 256 .WillRepeatedly(Invoke(this,
257 &DesktopProcessTest::CreateDesktopEnvironment)); 257 &DesktopProcessTest::CreateDesktopEnvironment));
258 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture()) 258 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture())
259 .Times(AnyNumber()) 259 .Times(AnyNumber())
260 .WillRepeatedly(Return(false)); 260 .WillRepeatedly(Return(false));
261 261
262 DesktopProcess desktop_process(ui_task_runner, io_task_runner_, channel_name); 262 DesktopProcess desktop_process(ui_task_runner, io_task_runner_, channel_name);
263 EXPECT_TRUE(desktop_process.Start(desktop_environment_factory.Pass())); 263 EXPECT_TRUE(desktop_process.Start(std::move(desktop_environment_factory)));
264 264
265 ui_task_runner = nullptr; 265 ui_task_runner = nullptr;
266 run_loop.Run(); 266 run_loop.Run();
267 } 267 }
268 268
269 void DesktopProcessTest::RunDeathTest() { 269 void DesktopProcessTest::RunDeathTest() {
270 InSequence s; 270 InSequence s;
271 EXPECT_CALL(daemon_listener_, OnChannelConnected(_)); 271 EXPECT_CALL(daemon_listener_, OnChannelConnected(_));
272 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_)) 272 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_))
273 .WillOnce(DoAll( 273 .WillOnce(DoAll(
(...skipping 60 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

Powered by Google App Engine
This is Rietveld 408576698