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

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

Issue 609923004: Cleanup usage of scoped_ptr<> in remoting for C++11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 new MockDesktopEnvironmentFactory()); 255 new MockDesktopEnvironmentFactory());
256 EXPECT_CALL(*desktop_environment_factory, CreatePtr()) 256 EXPECT_CALL(*desktop_environment_factory, CreatePtr())
257 .Times(AnyNumber()) 257 .Times(AnyNumber())
258 .WillRepeatedly(Invoke(this, 258 .WillRepeatedly(Invoke(this,
259 &DesktopProcessTest::CreateDesktopEnvironment)); 259 &DesktopProcessTest::CreateDesktopEnvironment));
260 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture()) 260 EXPECT_CALL(*desktop_environment_factory, SupportsAudioCapture())
261 .Times(AnyNumber()) 261 .Times(AnyNumber())
262 .WillRepeatedly(Return(false)); 262 .WillRepeatedly(Return(false));
263 263
264 DesktopProcess desktop_process(ui_task_runner, io_task_runner_, channel_name); 264 DesktopProcess desktop_process(ui_task_runner, io_task_runner_, channel_name);
265 EXPECT_TRUE(desktop_process.Start( 265 EXPECT_TRUE(desktop_process.Start(desktop_environment_factory.Pass()));
266 desktop_environment_factory.PassAs<DesktopEnvironmentFactory>()));
267 266
268 ui_task_runner = NULL; 267 ui_task_runner = NULL;
269 run_loop.Run(); 268 run_loop.Run();
270 } 269 }
271 270
272 void DesktopProcessTest::RunDeathTest() { 271 void DesktopProcessTest::RunDeathTest() {
273 InSequence s; 272 InSequence s;
274 EXPECT_CALL(daemon_listener_, OnChannelConnected(_)); 273 EXPECT_CALL(daemon_listener_, OnChannelConnected(_));
275 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_)) 274 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_))
276 .WillOnce(DoAll( 275 .WillOnce(DoAll(
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 336 }
338 337
339 // Run the desktop process and ask it to crash. 338 // Run the desktop process and ask it to crash.
340 TEST_F(DesktopProcessTest, DeathTest) { 339 TEST_F(DesktopProcessTest, DeathTest) {
341 testing::GTEST_FLAG(death_test_style) = "threadsafe"; 340 testing::GTEST_FLAG(death_test_style) = "threadsafe";
342 341
343 EXPECT_DEATH(RunDeathTest(), ""); 342 EXPECT_DEATH(RunDeathTest(), "");
344 } 343 }
345 344
346 } // namespace remoting 345 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698