| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 | 12 |
| 13 #if defined(OS_MACOSX) | 13 #if defined(OS_MACOSX) |
| 14 #include "net/base/x509_certificate.h" | 14 #include "net/base/x509_certificate.h" |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #include "base/file_util.h" | 17 #include "base/file_util.h" |
| 18 #include "base/leak_annotations.h" | 18 #include "base/leak_annotations.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/path_service.h" | 20 #include "base/path_service.h" |
| 21 #include "base/string_number_conversions.h" | 21 #include "base/string_number_conversions.h" |
| 22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
| 24 #include "net/base/cert_test_util.h" | 24 #include "net/base/cert_test_util.h" |
| 25 #include "net/base/host_port_pair.h" | 25 #include "net/base/host_port_pair.h" |
| 26 #include "net/base/host_resolver.h" | 26 #include "net/base/host_resolver.h" |
| 27 #include "net/base/test_completion_callback.h" | 27 #include "net/base/test_completion_callback.h" |
| 28 #include "net/socket/tcp_client_socket.h" | 28 #include "net/socket/tcp_client_socket.h" |
| 29 #include "net/socket/tcp_pinger.h" | 29 #include "net/socket/tcp_pinger.h" |
| 30 #include "net/test/python_utils.h" |
| 30 #include "testing/platform_test.h" | 31 #include "testing/platform_test.h" |
| 31 | 32 |
| 32 namespace { | 33 namespace { |
| 33 | 34 |
| 34 // Number of connection attempts for tests. | 35 // Number of connection attempts for tests. |
| 35 const int kServerConnectionAttempts = 10; | 36 const int kServerConnectionAttempts = 10; |
| 36 | 37 |
| 37 // Connection timeout in milliseconds for tests. | 38 // Connection timeout in milliseconds for tests. |
| 38 const int kServerConnectionTimeoutMs = 1000; | 39 const int kServerConnectionTimeoutMs = 1000; |
| 39 | 40 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 return certificates_dir_.AppendASCII("ok_cert.pem"); | 293 return certificates_dir_.AppendASCII("ok_cert.pem"); |
| 293 case TYPE_HTTPS_EXPIRED_CERTIFICATE: | 294 case TYPE_HTTPS_EXPIRED_CERTIFICATE: |
| 294 return certificates_dir_.AppendASCII("expired_cert.pem"); | 295 return certificates_dir_.AppendASCII("expired_cert.pem"); |
| 295 default: | 296 default: |
| 296 NOTREACHED(); | 297 NOTREACHED(); |
| 297 } | 298 } |
| 298 return FilePath(); | 299 return FilePath(); |
| 299 } | 300 } |
| 300 | 301 |
| 301 } // namespace net | 302 } // namespace net |
| OLD | NEW |