| 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 "content/test/layout_test_http_server.h" | 5 #include "content/test/layout_test_http_server.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 bool PrepareCommandLine(CommandLine* cmd_line) { | 21 bool PrepareCommandLine(CommandLine* cmd_line) { |
| 22 FilePath src_path; | 22 FilePath src_path; |
| 23 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_path)) | 23 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_path)) |
| 24 return false; | 24 return false; |
| 25 | 25 |
| 26 FilePath python_runtime; | 26 FilePath python_runtime; |
| 27 if (!GetPythonRunTime(&python_runtime)) | 27 if (!GetPythonRunTime(&python_runtime)) |
| 28 return false; | 28 return false; |
| 29 cmd_line->SetProgram(python_runtime); | 29 cmd_line->SetProgram(python_runtime); |
| 30 | 30 |
| 31 // Use unbuffered output, so that testserver output doesn't mix with gtest |
| 32 // output in test log files. See http://crbug.com/147368. |
| 33 cmd_line->AppendArg("-u"); |
| 34 |
| 31 FilePath script_path(src_path); | 35 FilePath script_path(src_path); |
| 32 script_path = script_path.AppendASCII("third_party"); | 36 script_path = script_path.AppendASCII("third_party"); |
| 33 script_path = script_path.AppendASCII("WebKit"); | 37 script_path = script_path.AppendASCII("WebKit"); |
| 34 script_path = script_path.AppendASCII("Tools"); | 38 script_path = script_path.AppendASCII("Tools"); |
| 35 script_path = script_path.AppendASCII("Scripts"); | 39 script_path = script_path.AppendASCII("Scripts"); |
| 36 script_path = script_path.AppendASCII("new-run-webkit-httpd"); | 40 script_path = script_path.AppendASCII("new-run-webkit-httpd"); |
| 37 | 41 |
| 38 cmd_line->AppendArgPath(script_path); | 42 cmd_line->AppendArgPath(script_path); |
| 39 return true; | 43 return true; |
| 40 } | 44 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 running_ = !stopped; | 129 running_ = !stopped; |
| 126 | 130 |
| 127 #if defined(OS_WIN) | 131 #if defined(OS_WIN) |
| 128 // Close the job object handle now. This should clean up | 132 // Close the job object handle now. This should clean up |
| 129 // any orphaned processes. | 133 // any orphaned processes. |
| 130 job_handle_.Close(); | 134 job_handle_.Close(); |
| 131 #endif | 135 #endif |
| 132 | 136 |
| 133 return stopped; | 137 return stopped; |
| 134 } | 138 } |
| OLD | NEW |