OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/test/test_server.h" | 5 #include "net/test/test_server.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <wincrypt.h> | 8 #include <wincrypt.h> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } // namespace | 89 } // namespace |
90 | 90 |
91 namespace net { | 91 namespace net { |
92 | 92 |
93 bool TestServer::LaunchPython(const FilePath& testserver_path) { | 93 bool TestServer::LaunchPython(const FilePath& testserver_path) { |
94 FilePath python_exe; | 94 FilePath python_exe; |
95 if (!PathService::Get(base::DIR_SOURCE_ROOT, &python_exe)) | 95 if (!PathService::Get(base::DIR_SOURCE_ROOT, &python_exe)) |
96 return false; | 96 return false; |
97 python_exe = python_exe | 97 python_exe = python_exe |
98 .Append(FILE_PATH_LITERAL("third_party")) | 98 .Append(FILE_PATH_LITERAL("third_party")) |
99 .Append(FILE_PATH_LITERAL("python_26")) | 99 .Append(FILE_PATH_LITERAL("python_24")) |
100 .Append(FILE_PATH_LITERAL("python.exe")); | 100 .Append(FILE_PATH_LITERAL("python.exe")); |
101 | 101 |
102 CommandLine python_command(python_exe); | 102 CommandLine python_command(python_exe); |
103 python_command.AppendArgPath(testserver_path); | 103 python_command.AppendArgPath(testserver_path); |
104 if (!AddCommandLineArguments(&python_command)) | 104 if (!AddCommandLineArguments(&python_command)) |
105 return false; | 105 return false; |
106 | 106 |
107 HANDLE child_read = NULL; | 107 HANDLE child_read = NULL; |
108 HANDLE child_write = NULL; | 108 HANDLE child_write = NULL; |
109 if (!CreatePipe(&child_read, &child_write, NULL, 0)) { | 109 if (!CreatePipe(&child_read, &child_write, NULL, 0)) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 "certificate to your trusted roots for this test to work. " | 208 "certificate to your trusted roots for this test to work. " |
209 "For more info visit:\n" | 209 "For more info visit:\n" |
210 "http://dev.chromium.org/developers/testing\n"; | 210 "http://dev.chromium.org/developers/testing\n"; |
211 return false; | 211 return false; |
212 } | 212 } |
213 | 213 |
214 return true; | 214 return true; |
215 } | 215 } |
216 | 216 |
217 } // namespace net | 217 } // namespace net |
OLD | NEW |