| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // may initiate a call to Java. | 52 // may initiate a call to Java. |
| 53 base::android::RegisterNativeMethods( | 53 base::android::RegisterNativeMethods( |
| 54 base::android::AttachCurrentThread(), | 54 base::android::AttachCurrentThread(), |
| 55 kNetTestRegisteredMethods, | 55 kNetTestRegisteredMethods, |
| 56 arraysize(kNetTestRegisteredMethods)); | 56 arraysize(kNetTestRegisteredMethods)); |
| 57 #endif | 57 #endif |
| 58 | 58 |
| 59 NetTestSuite test_suite(argc, argv); | 59 NetTestSuite test_suite(argc, argv); |
| 60 ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false); | 60 ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false); |
| 61 | 61 |
| 62 #if defined(OS_WIN) && !defined(USE_OPENSSL) | |
| 63 // We want to be sure to init NSPR on the main thread. | |
| 64 crypto::EnsureNSPRInit(); | |
| 65 #endif | |
| 66 | |
| 67 // Enable support for SSL server sockets, which must be done while | 62 // Enable support for SSL server sockets, which must be done while |
| 68 // single-threaded. | 63 // single-threaded. |
| 69 net::EnableSSLServerSockets(); | 64 net::EnableSSLServerSockets(); |
| 70 | 65 |
| 71 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 66 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 72 mojo::edk::Init(); | 67 mojo::edk::Init(); |
| 73 #endif | 68 #endif |
| 74 | 69 |
| 75 return base::LaunchUnitTests( | 70 return base::LaunchUnitTests( |
| 76 argc, argv, base::Bind(&NetTestSuite::Run, | 71 argc, argv, base::Bind(&NetTestSuite::Run, |
| 77 base::Unretained(&test_suite))); | 72 base::Unretained(&test_suite))); |
| 78 } | 73 } |
| OLD | NEW |