| Index: content/public/test/test_launcher.cc
|
| ===================================================================
|
| --- content/public/test/test_launcher.cc (revision 257128)
|
| +++ content/public/test/test_launcher.cc (working copy)
|
| @@ -60,6 +60,7 @@
|
| const char kManualTestPrefix[] = "MANUAL_";
|
|
|
| TestLauncherDelegate* g_launcher_delegate;
|
| +ContentMainParams* g_params;
|
|
|
| std::string RemoveAnyPrePrefixes(const std::string& test_name) {
|
| std::string result(test_name);
|
| @@ -476,13 +477,27 @@
|
| command_line->HasSwitch(base::kGTestFilterFlag)) ||
|
| command_line->HasSwitch(base::kGTestListTestsFlag) ||
|
| command_line->HasSwitch(base::kGTestHelpFlag)) {
|
| -#if defined(OS_WIN)
|
| - if (command_line->HasSwitch(kSingleProcessTestsFlag)) {
|
| - sandbox::SandboxInterfaceInfo sandbox_info;
|
| - InitializeSandboxInfo(&sandbox_info);
|
| - InitializeSandbox(&sandbox_info);
|
| - }
|
| -#endif
|
| +
|
| + // COPY OF RUNCONTENTMAIN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| + scoped_ptr<ContentMainDelegate> chrome_main_delegate(
|
| + launcher_delegate->CreateContentMainDelegate());
|
| + ContentMainParams params(chrome_main_delegate.get());
|
| +
|
| + #if defined(OS_WIN)
|
| + sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
| + InitializeSandboxInfo(&sandbox_info);
|
| +
|
| + params.instance = GetModuleHandle(NULL);
|
| + params.sandbox_info = &sandbox_info;
|
| + #elif defined(OS_LINUX)
|
| + params.argc = argc;
|
| + params.argv = const_cast<const char**>(argv);
|
| + #endif // defined(OS_WIN)
|
| + // END COPY!!!!!!!!!!!!!!!!!
|
| +
|
| + g_params = ¶ms;
|
| +
|
| +
|
| return launcher_delegate->RunTestSuite(argc, argv);
|
| }
|
|
|
| @@ -518,4 +533,8 @@
|
| return g_launcher_delegate;
|
| }
|
|
|
| +ContentMainParams* GetContentMainParams() {
|
| + return g_params;
|
| +}
|
| +
|
| } // namespace content
|
|
|