OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/common/test/multiprocess_test_base.h" | 5 #include "mojo/common/test/multiprocess_test_base.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); | 23 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); |
24 } | 24 } |
25 | 25 |
26 void MultiprocessTestBase::SetUp() { | 26 void MultiprocessTestBase::SetUp() { |
27 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); | 27 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); |
28 | 28 |
29 MultiProcessTest::SetUp(); | 29 MultiProcessTest::SetUp(); |
30 | 30 |
31 // TODO(vtl): Not implemented on Windows yet. | 31 // TODO(vtl): Not implemented on Windows yet. |
32 #if defined(OS_POSIX) | 32 #if defined(OS_POSIX) |
33 platform_channel_pair_.reset(new system::PlatformChannelPair()); | 33 platform_channel_pair_.reset(new embedder::PlatformChannelPair()); |
34 server_platform_handle = platform_channel_pair_->PassServerHandle(); | 34 server_platform_handle = platform_channel_pair_->PassServerHandle(); |
35 #endif | 35 #endif |
36 } | 36 } |
37 | 37 |
38 void MultiprocessTestBase::TearDown() { | 38 void MultiprocessTestBase::TearDown() { |
39 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); | 39 CHECK_EQ(test_child_handle_, base::kNullProcessHandle); |
40 | 40 |
41 server_platform_handle.reset(); | 41 server_platform_handle.reset(); |
42 platform_channel_pair_.reset(); | 42 platform_channel_pair_.reset(); |
43 | 43 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #endif | 96 #endif |
97 return command_line; | 97 return command_line; |
98 } | 98 } |
99 | 99 |
100 // static | 100 // static |
101 void MultiprocessTestBase::ChildSetup() { | 101 void MultiprocessTestBase::ChildSetup() { |
102 CHECK(CommandLine::InitializedForCurrentProcess()); | 102 CHECK(CommandLine::InitializedForCurrentProcess()); |
103 // TODO(vtl): Not implemented on Windows yet. | 103 // TODO(vtl): Not implemented on Windows yet. |
104 #if defined(OS_POSIX) | 104 #if defined(OS_POSIX) |
105 client_platform_handle = | 105 client_platform_handle = |
106 system::PlatformChannelPair::PassClientHandleFromParentProcess( | 106 embedder::PlatformChannelPair::PassClientHandleFromParentProcess( |
107 *CommandLine::ForCurrentProcess()); | 107 *CommandLine::ForCurrentProcess()); |
108 #endif | 108 #endif |
109 } | 109 } |
110 | 110 |
111 // static | 111 // static |
112 system::ScopedPlatformHandle MultiprocessTestBase::client_platform_handle; | 112 embedder::ScopedPlatformHandle MultiprocessTestBase::client_platform_handle; |
113 | 113 |
114 } // namespace test | 114 } // namespace test |
115 } // namespace mojo | 115 } // namespace mojo |
OLD | NEW |