diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-09 22:00:47 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-09 22:00:47 +0000 |
commit | 95cb7fb94d22b073291ee45bf10ea880a4d93b33 (patch) | |
tree | 073bb49e20a94846f46106557904de2715c787c7 /base/multiprocess_test.h | |
parent | 767cc7f25de0c9be199d1f4f267e569ff6788119 (diff) | |
download | chromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.zip chromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.tar.gz chromium_src-95cb7fb94d22b073291ee45bf10ea880a4d93b33.tar.bz2 |
Bring up ipc tests on POSIX.
Review URL: http://codereview.chromium.org/13158
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/multiprocess_test.h')
-rw-r--r-- | base/multiprocess_test.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/base/multiprocess_test.h b/base/multiprocess_test.h index 6f2dd40..f4bf34c 100644 --- a/base/multiprocess_test.h +++ b/base/multiprocess_test.h @@ -5,6 +5,7 @@ #ifndef BASE_MULTIPROCESS_TEST_H__ #define BASE_MULTIPROCESS_TEST_H__ +#include "base/base_switches.h" #include "base/command_line.h" #include "base/process_util.h" #include "base/string_util.h" @@ -52,18 +53,32 @@ class MultiProcessTest : public PlatformTest { // TODO(darin): re-enable this once we have base/debug_util.h // ProcessDebugFlags(&cl, DebugUtil::UNKNOWN, false); base::ProcessHandle SpawnChild(const std::wstring& procname) { + return SpawnChild(procname, false); + } + + base::ProcessHandle SpawnChild(const std::wstring& procname, + bool debug_on_start) { CommandLine cl; base::ProcessHandle handle = static_cast<base::ProcessHandle>(NULL); #if defined(OS_WIN) std::wstring clstr = cl.command_line_string(); CommandLine::AppendSwitchWithValue(&clstr, kRunClientProcess, procname); + + if (debug_on_start) { + CommandLine::AppendSwitch(&clstr, switches::kDebugOnStart); + } + base::LaunchApp(clstr, false, true, &handle); #elif defined(OS_POSIX) std::vector<std::string> clvec(cl.argv()); std::wstring wswitchstr = CommandLine::PrefixedSwitchStringWithValue(kRunClientProcess, procname); + if (debug_on_start) { + CommandLine::AppendSwitch(&wswitchstr, switches::kDebugOnStart); + } + std::string switchstr = WideToUTF8(wswitchstr); clvec.push_back(switchstr.c_str()); base::LaunchApp(clvec, false, &handle); |