Index: chrome/test/base/chrome_test_launcher.cc |
=================================================================== |
--- chrome/test/base/chrome_test_launcher.cc (revision 133679) |
+++ chrome/test/base/chrome_test_launcher.cc (working copy) |
@@ -38,9 +38,14 @@ |
} |
virtual bool Run(int argc, char** argv, int* return_code) OVERRIDE { |
+#if defined(OS_WIN) || defined(OS_LINUX) |
+ CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ bool launch_chrome = |
+ command_line->HasSwitch(switches::kProcessType) || |
+ command_line->HasSwitch(ChromeTestSuite::kLaunchAsBrowser); |
+#endif |
#if defined(OS_WIN) |
- CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- if (command_line->HasSwitch(switches::kProcessType)) { |
+ if (launch_chrome) { |
sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
content::InitializeSandboxInfo(&sandbox_info); |
ChromeMainDelegate chrome_main_delegate; |
@@ -50,8 +55,7 @@ |
return true; |
} |
#elif defined(OS_LINUX) |
- CommandLine* command_line = CommandLine::ForCurrentProcess(); |
- if (command_line->HasSwitch(switches::kProcessType)) { |
+ if (launch_chrome) { |
ChromeMainDelegate chrome_main_delegate; |
*return_code = content::ContentMain(argc, |
const_cast<const char**>(argv), |