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