| 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/metrics/statistics_recorder.h" | 5 #include "base/metrics/statistics_recorder.h" |
| 6 #include "base/test/launcher/unit_test_launcher.h" | 6 #include "base/test/launcher/unit_test_launcher.h" |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "crypto/nss_util.h" | 8 #include "crypto/nss_util.h" |
| 9 #include "net/socket/client_socket_pool_base.h" | 9 #include "net/socket/client_socket_pool_base.h" |
| 10 #include "net/socket/ssl_server_socket.h" | 10 #include "net/socket/ssl_server_socket.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 using net::internal::ClientSocketPoolBaseHelper; | 26 using net::internal::ClientSocketPoolBaseHelper; |
| 27 using net::SpdySession; | 27 using net::SpdySession; |
| 28 | 28 |
| 29 int main(int argc, char** argv) { | 29 int main(int argc, char** argv) { |
| 30 // Record histograms, so we can get histograms data in tests. | 30 // Record histograms, so we can get histograms data in tests. |
| 31 base::StatisticsRecorder::Initialize(); | 31 base::StatisticsRecorder::Initialize(); |
| 32 | 32 |
| 33 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
| 34 const base::android::RegistrationMethod kNetTestRegisteredMethods[] = { | 34 const base::android::RegistrationMethod kNetTestRegisteredMethods[] = { |
| 35 {"NetAndroid", net::android::RegisterJni}, | 35 {"NetAndroid", net::android::RegisterJni}, |
| 36 {"TestFileUtil", file_util::RegisterContentUriTestUtils}, | 36 {"TestFileUtil", base::RegisterContentUriTestUtils}, |
| 37 {"UrlAndroid", url::android::RegisterJni}, | 37 {"UrlAndroid", url::android::RegisterJni}, |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 // Register JNI bindings for android. Doing it early as the test suite setup | 40 // Register JNI bindings for android. Doing it early as the test suite setup |
| 41 // may initiate a call to Java. | 41 // may initiate a call to Java. |
| 42 base::android::RegisterNativeMethods( | 42 base::android::RegisterNativeMethods( |
| 43 base::android::AttachCurrentThread(), | 43 base::android::AttachCurrentThread(), |
| 44 kNetTestRegisteredMethods, | 44 kNetTestRegisteredMethods, |
| 45 arraysize(kNetTestRegisteredMethods)); | 45 arraysize(kNetTestRegisteredMethods)); |
| 46 #endif | 46 #endif |
| (...skipping 11 matching lines...) Expand all Loading... |
| 58 net::EnableSSLServerSockets(); | 58 net::EnableSSLServerSockets(); |
| 59 | 59 |
| 60 #if !defined(OS_IOS) | 60 #if !defined(OS_IOS) |
| 61 net::ProxyResolverV8::EnsureIsolateCreated(); | 61 net::ProxyResolverV8::EnsureIsolateCreated(); |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 return base::LaunchUnitTests( | 64 return base::LaunchUnitTests( |
| 65 argc, argv, base::Bind(&NetTestSuite::Run, | 65 argc, argv, base::Bind(&NetTestSuite::Run, |
| 66 base::Unretained(&test_suite))); | 66 base::Unretained(&test_suite))); |
| 67 } | 67 } |
| OLD | NEW |