| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 test_data_directory + L"\""; | 288 test_data_directory + L"\""; |
| 289 if (!cert_path.empty()) { | 289 if (!cert_path.empty()) { |
| 290 command_line.append(L" --https=\""); | 290 command_line.append(L" --https=\""); |
| 291 command_line.append(cert_path); | 291 command_line.append(cert_path); |
| 292 command_line.append(L"\""); | 292 command_line.append(L"\""); |
| 293 } | 293 } |
| 294 | 294 |
| 295 ASSERT_TRUE( | 295 ASSERT_TRUE( |
| 296 base::LaunchApp(command_line, false, true, &process_handle_)) << | 296 base::LaunchApp(command_line, false, true, &process_handle_)) << |
| 297 "Failed to launch " << command_line; | 297 "Failed to launch " << command_line; |
| 298 #elif defined(OS_LINUX) | 298 #elif defined(OS_POSIX) |
| 299 bool tlslite_installed = !access("/usr/bin/tls.py", X_OK); | 299 bool tlslite_installed = !access("/usr/bin/tls.py", X_OK) || |
| 300 !access("/usr/local/bin/tls.py", X_OK); |
| 300 ASSERT_TRUE(tlslite_installed) << "tlslite not installed? Please run 'pytho
n setup.py install' in third_party/tlslite."; | 301 ASSERT_TRUE(tlslite_installed) << "tlslite not installed? Please run 'pytho
n setup.py install' in third_party/tlslite."; |
| 301 | 302 |
| 302 std::vector<std::string> command_line; | 303 std::vector<std::string> command_line; |
| 303 command_line.push_back("python"); | 304 command_line.push_back("python"); |
| 304 command_line.push_back(WideToUTF8(testserver_path)); | 305 command_line.push_back(WideToUTF8(testserver_path)); |
| 305 command_line.push_back("--port=" + port_str); | 306 command_line.push_back("--port=" + port_str); |
| 306 command_line.push_back("--data-dir=" + WideToUTF8(test_data_directory)); | 307 command_line.push_back("--data-dir=" + WideToUTF8(test_data_directory)); |
| 307 if (!cert_path.empty()) | 308 if (!cert_path.empty()) |
| 308 command_line.push_back("--https=" + WideToUTF8(cert_path)); | 309 command_line.push_back("--https=" + WideToUTF8(cert_path)); |
| 309 | 310 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 const std::wstring& document_root, | 402 const std::wstring& document_root, |
| 402 const std::wstring& cert_path) : TestServer(ManualInit()) { | 403 const std::wstring& cert_path) : TestServer(ManualInit()) { |
| 403 Init(host_name, port, document_root, cert_path); | 404 Init(host_name, port, document_root, cert_path); |
| 404 } | 405 } |
| 405 | 406 |
| 406 virtual std::string scheme() { return std::string("https"); } | 407 virtual std::string scheme() { return std::string("https"); } |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ | 410 #endif // NET_URL_REQUEST_URL_REQUEST_UNITTEST_H_ |
| 410 | 411 |
| OLD | NEW |