OLD | NEW |
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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/win/scoped_handle.h" | 9 #include "base/win/scoped_handle.h" |
10 #include "base/win/scoped_process_information.h" | 10 #include "base/win/scoped_process_information.h" |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 if (channel_client_) | 305 if (channel_client_) |
306 channel_client_->Send(new ChromotingDesktopNetworkMsg_DisconnectSession()); | 306 channel_client_->Send(new ChromotingDesktopNetworkMsg_DisconnectSession()); |
307 } | 307 } |
308 | 308 |
309 void WorkerProcessLauncherTest::CrashWorker() { | 309 void WorkerProcessLauncherTest::CrashWorker() { |
310 launcher_->Crash(FROM_HERE); | 310 launcher_->Crash(FROM_HERE); |
311 } | 311 } |
312 | 312 |
313 void WorkerProcessLauncherTest::StartWorker() { | 313 void WorkerProcessLauncherTest::StartWorker() { |
314 launcher_.reset(new WorkerProcessLauncher( | 314 launcher_.reset(new WorkerProcessLauncher( |
315 launcher_delegate_.PassAs<WorkerProcessLauncher::Delegate>(), | 315 launcher_delegate_.Pass(), |
316 &server_listener_)); | 316 &server_listener_)); |
317 | 317 |
318 launcher_->SetKillProcessTimeoutForTest(base::TimeDelta::FromMilliseconds(0)); | 318 launcher_->SetKillProcessTimeoutForTest(base::TimeDelta::FromMilliseconds(0)); |
319 } | 319 } |
320 | 320 |
321 void WorkerProcessLauncherTest::StopWorker() { | 321 void WorkerProcessLauncherTest::StopWorker() { |
322 launcher_.reset(); | 322 launcher_.reset(); |
323 DisconnectClient(); | 323 DisconnectClient(); |
324 channel_name_.clear(); | 324 channel_name_.clear(); |
325 channel_server_.reset(); | 325 channel_server_.reset(); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 EXPECT_CALL(client_listener_, OnCrash(_, _, _)) | 523 EXPECT_CALL(client_listener_, OnCrash(_, _, _)) |
524 .Times(1) | 524 .Times(1) |
525 .WillOnce(InvokeWithoutArgs( | 525 .WillOnce(InvokeWithoutArgs( |
526 this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher)); | 526 this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher)); |
527 | 527 |
528 StartWorker(); | 528 StartWorker(); |
529 message_loop_.Run(); | 529 message_loop_.Run(); |
530 } | 530 } |
531 | 531 |
532 } // namespace remoting | 532 } // namespace remoting |
OLD | NEW |