| 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 partly tests child_main.*. | 5 // Note: This file also partly tests child_main.*. |
| 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" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "mojo/message_pump/message_pump_mojo.h" | 13 #include "mojo/message_pump/message_pump_mojo.h" |
| 14 #include "mojo/public/c/system/types.h" | 14 #include "mojo/public/c/system/result.h" |
| 15 #include "mojo/public/cpp/system/message_pipe.h" | 15 #include "mojo/public/cpp/system/message_pipe.h" |
| 16 #include "shell/application_manager/native_application_options.h" | 16 #include "shell/application_manager/native_application_options.h" |
| 17 #include "shell/context.h" | 17 #include "shell/context.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 namespace shell { | 20 namespace shell { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // Subclass just so we can observe |DidStart()|. | 23 // Subclass just so we can observe |DidStart()|. |
| 24 class TestChildProcessHost : public ChildProcessHost { | 24 class TestChildProcessHost : public ChildProcessHost { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 EXPECT_EQ(MOJO_RESULT_UNKNOWN, result); | 93 EXPECT_EQ(MOJO_RESULT_UNKNOWN, result); |
| 94 int exit_code = child_process_host.Join(); | 94 int exit_code = child_process_host.Join(); |
| 95 VLOG(2) << "Joined child: exit_code = " << exit_code; | 95 VLOG(2) << "Joined child: exit_code = " << exit_code; |
| 96 EXPECT_EQ(123, exit_code); | 96 EXPECT_EQ(123, exit_code); |
| 97 | 97 |
| 98 context.Shutdown(); | 98 context.Shutdown(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace | 101 } // namespace |
| 102 } // namespace shell | 102 } // namespace shell |
| OLD | NEW |