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

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

Issue 12545006: The worker process launcher can now ask the worker to crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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/desktop_process.cc ('k') | remoting/host/desktop_session_win.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"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_)) 274 EXPECT_CALL(daemon_listener_, OnDesktopAttached(_))
275 .WillOnce(DoAll( 275 .WillOnce(DoAll(
276 Invoke(this, &DesktopProcessTest::OnDesktopAttached), 276 Invoke(this, &DesktopProcessTest::OnDesktopAttached),
277 InvokeWithoutArgs(this, &DesktopProcessTest::SendCrashRequest))); 277 InvokeWithoutArgs(this, &DesktopProcessTest::SendCrashRequest)));
278 278
279 RunDesktopProcess(); 279 RunDesktopProcess();
280 } 280 }
281 281
282 void DesktopProcessTest::SendCrashRequest() { 282 void DesktopProcessTest::SendCrashRequest() {
283 tracked_objects::Location location = FROM_HERE; 283 tracked_objects::Location location = FROM_HERE;
284 daemon_channel_->Send(new ChromotingDaemonDesktopMsg_Crash( 284 daemon_channel_->Send(new ChromotingDaemonMsg_Crash(
285 location.function_name(), location.file_name(), location.line_number())); 285 location.function_name(), location.file_name(), location.line_number()));
286 } 286 }
287 287
288 void DesktopProcessTest::SendStartSessionAgent() { 288 void DesktopProcessTest::SendStartSessionAgent() {
289 // TODO(alexeypa): Fix DesktopProcess to use the desktop environment 289 // TODO(alexeypa): Fix DesktopProcess to use the desktop environment
290 // to create the disconnect window instead of directly calling 290 // to create the disconnect window instead of directly calling
291 // DisconnectWindow::Create(). This will take care of "Uninteresting mock 291 // DisconnectWindow::Create(). This will take care of "Uninteresting mock
292 // function call" warnings printed when DisconnectWindow::Show() and 292 // function call" warnings printed when DisconnectWindow::Show() and
293 // DisconnectWindow::Hide() are called. 293 // DisconnectWindow::Hide() are called.
294 network_channel_->Send(new ChromotingNetworkDesktopMsg_StartSessionAgent( 294 network_channel_->Send(new ChromotingNetworkDesktopMsg_StartSessionAgent(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 341 }
342 342
343 // Run the desktop process and ask it to crash. 343 // Run the desktop process and ask it to crash.
344 TEST_F(DesktopProcessTest, DeathTest) { 344 TEST_F(DesktopProcessTest, DeathTest) {
345 testing::GTEST_FLAG(death_test_style) = "threadsafe"; 345 testing::GTEST_FLAG(death_test_style) = "threadsafe";
346 346
347 EXPECT_DEATH(RunDeathTest(), ""); 347 EXPECT_DEATH(RunDeathTest(), "");
348 } 348 }
349 349
350 } // namespace remoting 350 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process.cc ('k') | remoting/host/desktop_session_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698