| 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 "base/build_time.h" | 5 #include "base/build_time.h" |
| 6 #include "base/metrics/statistics_recorder.h" | 6 #include "base/metrics/statistics_recorder.h" |
| 7 #include "base/test/launcher/unit_test_launcher.h" | 7 #include "base/test/launcher/unit_test_launcher.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "crypto/nss_util.h" | 9 #include "crypto/nss_util.h" |
| 10 #include "net/socket/client_socket_pool_base.h" | 10 #include "net/socket/client_socket_pool_base.h" |
| 11 #include "net/test/net_test_suite.h" | 11 #include "net/test/net_test_suite.h" |
| 12 #include "url/url_features.h" | 12 #include "url/url_features.h" |
| 13 | 13 |
| 14 #if defined(OS_ANDROID) | 14 #if defined(OS_ANDROID) |
| 15 #include "base/android/jni_android.h" | 15 #include "base/android/jni_android.h" |
| 16 #include "base/android/jni_registrar.h" | 16 #include "base/android/jni_registrar.h" |
| 17 #include "net/android/dummy_spnego_authenticator.h" | 17 #include "net/android/dummy_spnego_authenticator.h" |
| 18 #include "net/android/net_jni_registrar.h" | 18 #include "net/android/net_jni_registrar.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 21 #if !defined(OS_IOS) |
| 22 #include "mojo/edk/embedder/embedder.h" // nogncheck | 22 #include "mojo/edk/embedder/embedder.h" // nogncheck |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 using net::internal::ClientSocketPoolBaseHelper; | 25 using net::internal::ClientSocketPoolBaseHelper; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 bool VerifyBuildIsTimely() { | 29 bool VerifyBuildIsTimely() { |
| 30 // This lines up with various //net security features, like Certificate | 30 // This lines up with various //net security features, like Certificate |
| 31 // Transparency or HPKP, in that they require the build time be less than 70 | 31 // Transparency or HPKP, in that they require the build time be less than 70 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 kNetTestRegisteredMethods, | 74 kNetTestRegisteredMethods, |
| 75 arraysize(kNetTestRegisteredMethods)); | 75 arraysize(kNetTestRegisteredMethods)); |
| 76 #endif | 76 #endif |
| 77 | 77 |
| 78 if (!VerifyBuildIsTimely()) | 78 if (!VerifyBuildIsTimely()) |
| 79 return 1; | 79 return 1; |
| 80 | 80 |
| 81 NetTestSuite test_suite(argc, argv); | 81 NetTestSuite test_suite(argc, argv); |
| 82 ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false); | 82 ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false); |
| 83 | 83 |
| 84 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 84 #if !defined(OS_IOS) |
| 85 mojo::edk::Init(); | 85 mojo::edk::Init(); |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 return base::LaunchUnitTests( | 88 return base::LaunchUnitTests( |
| 89 argc, argv, base::Bind(&NetTestSuite::Run, | 89 argc, argv, base::Bind(&NetTestSuite::Run, |
| 90 base::Unretained(&test_suite))); | 90 base::Unretained(&test_suite))); |
| 91 } | 91 } |
| OLD | NEW |