OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/multiprocess_test.h" | 6 #include "base/multiprocess_test.h" |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
9 #include "chrome/common/ipc_channel.h" | |
10 #include "chrome/common/main_function_params.h" | 9 #include "chrome/common/main_function_params.h" |
| 10 #include "ipc/ipc_channel.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 // TODO(port): Bring up this test this on other platforms. | 13 // TODO(port): Bring up this test this on other platforms. |
14 #if defined(OS_MACOSX) | 14 #if defined(OS_MACOSX) |
15 | 15 |
16 using base::ProcessHandle; | 16 using base::ProcessHandle; |
17 | 17 |
18 const char kRendererTestChannelName[] = "test"; | 18 const char kRendererTestChannelName[] = "test"; |
19 | 19 |
20 extern int RendererMain(const MainFunctionParams& parameters); | 20 extern int RendererMain(const MainFunctionParams& parameters); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 control_channel.Connect(); | 95 control_channel.Connect(); |
96 MessageLoop::current()->Run(); | 96 MessageLoop::current()->Run(); |
97 | 97 |
98 // The renderer should exit when we close the channel. | 98 // The renderer should exit when we close the channel. |
99 control_channel.Close(); | 99 control_channel.Close(); |
100 | 100 |
101 EXPECT_TRUE(base::WaitForSingleProcess(renderer_pid, 5000)); | 101 EXPECT_TRUE(base::WaitForSingleProcess(renderer_pid, 5000)); |
102 } | 102 } |
103 | 103 |
104 #endif // defined(OS_MACOSX) | 104 #endif // defined(OS_MACOSX) |
OLD | NEW |