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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 321 |
322 void WorkerProcessLauncherTest::StopWorker() { | 322 void WorkerProcessLauncherTest::StopWorker() { |
323 launcher_.reset(); | 323 launcher_.reset(); |
324 DisconnectClient(); | 324 DisconnectClient(); |
325 channel_name_.clear(); | 325 channel_name_.clear(); |
326 channel_server_.reset(); | 326 channel_server_.reset(); |
327 task_runner_ = nullptr; | 327 task_runner_ = nullptr; |
328 } | 328 } |
329 | 329 |
330 void WorkerProcessLauncherTest::QuitMainMessageLoop() { | 330 void WorkerProcessLauncherTest::QuitMainMessageLoop() { |
331 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); | 331 message_loop_.PostTask(FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
332 } | 332 } |
333 | 333 |
334 void WorkerProcessLauncherTest::DoLaunchProcess() { | 334 void WorkerProcessLauncherTest::DoLaunchProcess() { |
335 EXPECT_TRUE(event_handler_); | 335 EXPECT_TRUE(event_handler_); |
336 EXPECT_FALSE(worker_process_.IsValid()); | 336 EXPECT_FALSE(worker_process_.IsValid()); |
337 | 337 |
338 WCHAR notepad[MAX_PATH + 1]; | 338 WCHAR notepad[MAX_PATH + 1]; |
339 ASSERT_GT(ExpandEnvironmentStrings( | 339 ASSERT_GT(ExpandEnvironmentStrings( |
340 L"\045SystemRoot\045\\system32\\notepad.exe", notepad, MAX_PATH), 0u); | 340 L"\045SystemRoot\045\\system32\\notepad.exe", notepad, MAX_PATH), 0u); |
341 | 341 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 EXPECT_CALL(client_listener_, OnCrash(_, _, _)) | 524 EXPECT_CALL(client_listener_, OnCrash(_, _, _)) |
525 .Times(1) | 525 .Times(1) |
526 .WillOnce(InvokeWithoutArgs( | 526 .WillOnce(InvokeWithoutArgs( |
527 this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher)); | 527 this, &WorkerProcessLauncherTest::SendFakeMessageToLauncher)); |
528 | 528 |
529 StartWorker(); | 529 StartWorker(); |
530 message_loop_.Run(); | 530 message_loop_.Run(); |
531 } | 531 } |
532 | 532 |
533 } // namespace remoting | 533 } // namespace remoting |
OLD | NEW |