| 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 "shell/child_process_host.h" | 7 #include "shell/child_process_host.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 scoped_ptr<base::MessagePump>(new common::MessagePumpMojo())); | 45 scoped_ptr<base::MessagePump>(new common::MessagePumpMojo())); |
| 46 context.Init(); | 46 context.Init(); |
| 47 TestChildProcessHostDelegate child_process_host_delegate; | 47 TestChildProcessHostDelegate child_process_host_delegate; |
| 48 ChildProcessHost child_process_host(&context, &child_process_host_delegate, | 48 ChildProcessHost child_process_host(&context, &child_process_host_delegate, |
| 49 ChildProcess::TYPE_TEST); | 49 ChildProcess::TYPE_TEST); |
| 50 child_process_host.Start(); | 50 child_process_host.Start(); |
| 51 message_loop.Run(); | 51 message_loop.Run(); |
| 52 int exit_code = child_process_host.Join(); | 52 int exit_code = child_process_host.Join(); |
| 53 VLOG(2) << "Joined child: exit_code = " << exit_code; | 53 VLOG(2) << "Joined child: exit_code = " << exit_code; |
| 54 EXPECT_EQ(0, exit_code); | 54 EXPECT_EQ(0, exit_code); |
| 55 |
| 56 context.Shutdown(); |
| 55 } | 57 } |
| 56 | 58 |
| 57 } // namespace | 59 } // namespace |
| 58 } // namespace test | 60 } // namespace test |
| 59 } // namespace shell | 61 } // namespace shell |
| 60 } // namespace mojo | 62 } // namespace mojo |
| OLD | NEW |