OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Note: This file also tests child_process.*. | 5 // Note: This file also tests child_process.*. |
6 | 6 |
7 #include "mojo/shell/runner/host/child_process_host.h" | 7 #include "mojo/shell/runner/host/child_process_host.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 ProcessDelegate delegate; | 90 ProcessDelegate delegate; |
91 edk::InitIPCSupport(&delegate, io_thread.task_runner()); | 91 edk::InitIPCSupport(&delegate, io_thread.task_runner()); |
92 | 92 |
93 NativeRunnerDelegateImpl native_runner_delegate; | 93 NativeRunnerDelegateImpl native_runner_delegate; |
94 ChildProcessHost child_process_host(blocking_pool.get(), | 94 ChildProcessHost child_process_host(blocking_pool.get(), |
95 &native_runner_delegate, false, | 95 &native_runner_delegate, false, |
96 Identity(), base::FilePath()); | 96 Identity(), base::FilePath()); |
97 base::RunLoop run_loop; | 97 base::RunLoop run_loop; |
98 child_process_host.Start( | 98 child_process_host.Start( |
99 mojom::ShellClientRequest(), String(), | 99 String(), |
100 base::Bind(&ProcessReadyCallbackAdapater, run_loop.QuitClosure()), | 100 base::Bind(&ProcessReadyCallbackAdapater, run_loop.QuitClosure()), |
101 base::Bind(&base::DoNothing)); | 101 base::Bind(&base::DoNothing)); |
102 run_loop.Run(); | 102 run_loop.Run(); |
103 | 103 |
104 child_process_host.Join(); | 104 child_process_host.Join(); |
105 blocking_pool->Shutdown(); | 105 blocking_pool->Shutdown(); |
106 edk::ShutdownIPCSupport(); | 106 edk::ShutdownIPCSupport(); |
107 EXPECT_EQ(1u, native_runner_delegate.get_and_clear_adjust_count()); | 107 EXPECT_EQ(1u, native_runner_delegate.get_and_clear_adjust_count()); |
108 } | 108 } |
109 | 109 |
110 } // namespace | 110 } // namespace |
111 } // namespace shell | 111 } // namespace shell |
112 } // namespace mojo | 112 } // namespace mojo |
OLD | NEW |