diff options
-rw-r--r-- | base/test/multiprocess_test.h | 6 | ||||
-rw-r--r-- | chrome/renderer/renderer_main_unittest.cc | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/base/test/multiprocess_test.h b/base/test/multiprocess_test.h index 5126abe..af7a180 100644 --- a/base/test/multiprocess_test.h +++ b/base/test/multiprocess_test.h @@ -63,7 +63,9 @@ class MultiProcessTest : public PlatformTest { bool debug_on_start); #endif - CommandLine MakeCmdLine(const std::string& procname, bool debug_on_start); + // Set up the command line used to spawn the child process. + virtual CommandLine MakeCmdLine(const std::string& procname, + bool debug_on_start); private: #if defined(OS_WIN) @@ -78,7 +80,7 @@ class MultiProcessTest : public PlatformTest { bool debug_on_start); #endif - DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); + DISALLOW_COPY_AND_ASSIGN(MultiProcessTest); }; } // namespace base diff --git a/chrome/renderer/renderer_main_unittest.cc b/chrome/renderer/renderer_main_unittest.cc index 7302057..d3de52c 100644 --- a/chrome/renderer/renderer_main_unittest.cc +++ b/chrome/renderer/renderer_main_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/compiler_specific.h" #include "base/message_loop.h" #include "base/process_util.h" #include "base/test/multiprocess_test.h" @@ -36,6 +37,9 @@ class RendererMainTest : public base::MultiProcessTest { base::ProcessHandle SpawnChild(const std::string& procname, IPC::Channel* channel); + virtual CommandLine MakeCmdLine(const std::string& procname, + bool debug_on_start) OVERRIDE; + // Created around each test instantiation. MessageLoopForIO *message_loop_; }; @@ -65,6 +69,19 @@ ProcessHandle RendererMainTest::SpawnChild(const std::string& procname, return MultiProcessTest::SpawnChild(procname, fds_to_map, false); } +CommandLine RendererMainTest::MakeCmdLine(const std::string& procname, + bool debug_on_start) { + CommandLine command_line = + MultiProcessTest::MakeCmdLine(procname, debug_on_start); +#if defined(USE_SECCOMP_SANDBOX) + // Turn off seccomp for this test. It's just a problem of refactoring, + // not a bug. + // http://code.google.com/p/chromium/issues/detail?id=59376 + command_line.AppendSwitch(switches::kDisableSeccompSandbox); +#endif + return command_line; +} + // Listener class that kills the message loop when it connects. class SuicidalListener : public IPC::Channel::Listener { public: |