| 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 #include "base/test/multiprocess_test.h" | 5 #include "base/test/multiprocess_test.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 return cmd_line; | 33 return cmd_line; |
| 34 } | 34 } |
| 35 | 35 |
| 36 // MultiProcessTest ------------------------------------------------------------ | 36 // MultiProcessTest ------------------------------------------------------------ |
| 37 | 37 |
| 38 MultiProcessTest::MultiProcessTest() { | 38 MultiProcessTest::MultiProcessTest() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 Process MultiProcessTest::SpawnChild(const std::string& procname) { | 41 Process MultiProcessTest::SpawnChild(const std::string& procname) { |
| 42 LaunchOptions options; | 42 LaunchOptions options; |
| 43 #if defined(OS_WIN) | |
| 44 options.start_hidden = true; | |
| 45 #endif | |
| 46 return SpawnChildWithOptions(procname, options); | 43 return SpawnChildWithOptions(procname, options); |
| 47 } | 44 } |
| 48 | 45 |
| 49 Process MultiProcessTest::SpawnChildWithOptions( | 46 Process MultiProcessTest::SpawnChildWithOptions( |
| 50 const std::string& procname, | 47 const std::string& procname, |
| 51 const LaunchOptions& options) { | 48 const LaunchOptions& options) { |
| 52 return SpawnMultiProcessTestChild(procname, MakeCmdLine(procname), options); | 49 return SpawnMultiProcessTestChild(procname, MakeCmdLine(procname), options); |
| 53 } | 50 } |
| 54 | 51 |
| 55 CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname) { | 52 CommandLine MultiProcessTest::MakeCmdLine(const std::string& procname) { |
| 56 CommandLine command_line = GetMultiProcessTestChildBaseCommandLine(); | 53 CommandLine command_line = GetMultiProcessTestChildBaseCommandLine(); |
| 57 command_line.AppendSwitchASCII(switches::kTestChildProcess, procname); | 54 command_line.AppendSwitchASCII(switches::kTestChildProcess, procname); |
| 58 return command_line; | 55 return command_line; |
| 59 } | 56 } |
| 60 | 57 |
| 61 } // namespace base | 58 } // namespace base |
| OLD | NEW |