OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef BASE_TEST_MULTIPROCESS_TEST_H_ | 5 #ifndef BASE_TEST_MULTIPROCESS_TEST_H_ |
6 #define BASE_TEST_MULTIPROCESS_TEST_H_ | 6 #define BASE_TEST_MULTIPROCESS_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/process/launch.h" | 11 #include "base/process/launch.h" |
12 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
15 | 15 |
| 16 namespace base { |
| 17 |
16 class CommandLine; | 18 class CommandLine; |
17 | 19 |
18 namespace base { | |
19 | |
20 // Helpers to spawn a child for a multiprocess test and execute a designated | 20 // Helpers to spawn a child for a multiprocess test and execute a designated |
21 // function. Use these when you already have another base class for your test | 21 // function. Use these when you already have another base class for your test |
22 // fixture, but you want (some) of your tests to be multiprocess (otherwise you | 22 // fixture, but you want (some) of your tests to be multiprocess (otherwise you |
23 // may just want to derive your fixture from |MultiProcessTest|, below). | 23 // may just want to derive your fixture from |MultiProcessTest|, below). |
24 // | 24 // |
25 // Use these helpers as follows: | 25 // Use these helpers as follows: |
26 // | 26 // |
27 // TEST_F(MyTest, ATest) { | 27 // TEST_F(MyTest, ATest) { |
28 // CommandLine command_line( | 28 // CommandLine command_line( |
29 // base::GetMultiProcessTestChildBaseCommandLine()); | 29 // base::GetMultiProcessTestChildBaseCommandLine()); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // |ModifyChildCommandLine()|; make the two divergent uses more sane. | 123 // |ModifyChildCommandLine()|; make the two divergent uses more sane. |
124 virtual CommandLine MakeCmdLine(const std::string& procname); | 124 virtual CommandLine MakeCmdLine(const std::string& procname); |
125 | 125 |
126 private: | 126 private: |
127 DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); | 127 DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace base | 130 } // namespace base |
131 | 131 |
132 #endif // BASE_TEST_MULTIPROCESS_TEST_H_ | 132 #endif // BASE_TEST_MULTIPROCESS_TEST_H_ |
OLD | NEW |