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