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" |
11 #include "net/spdy/spdy_session.h" | 11 #include "net/spdy/spdy_session.h" |
12 #include "net/test/net_test_suite.h" | 12 #include "net/test/net_test_suite.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 "base/test/test_file_util.h" | 17 #include "base/test/test_file_util.h" |
18 #include "base/test/test_ui_thread_android.h" | 18 #include "base/test/test_ui_thread_android.h" |
19 #include "net/android/dummy_spnego_authenticator.h" | 19 #include "net/android/dummy_spnego_authenticator.h" |
20 #include "net/android/net_jni_registrar.h" | 20 #include "net/android/net_jni_registrar.h" |
21 #include "url/android/url_jni_registrar.h" | 21 #include "url/android/url_jni_registrar.h" |
22 #endif | 22 #endif |
23 | 23 |
24 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 24 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
25 #include "third_party/mojo/src/mojo/edk/embedder/test_embedder.h" | 25 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" |
26 #endif | 26 #endif |
27 | 27 |
28 using net::internal::ClientSocketPoolBaseHelper; | 28 using net::internal::ClientSocketPoolBaseHelper; |
29 using net::SpdySession; | 29 using net::SpdySession; |
30 | 30 |
31 int main(int argc, char** argv) { | 31 int main(int argc, char** argv) { |
32 // Record histograms, so we can get histograms data in tests. | 32 // Record histograms, so we can get histograms data in tests. |
33 base::StatisticsRecorder::Initialize(); | 33 base::StatisticsRecorder::Initialize(); |
34 | 34 |
35 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
(...skipping 20 matching lines...) Expand all Loading... |
56 #if defined(OS_WIN) && !defined(USE_OPENSSL) | 56 #if defined(OS_WIN) && !defined(USE_OPENSSL) |
57 // We want to be sure to init NSPR on the main thread. | 57 // We want to be sure to init NSPR on the main thread. |
58 crypto::EnsureNSPRInit(); | 58 crypto::EnsureNSPRInit(); |
59 #endif | 59 #endif |
60 | 60 |
61 // Enable support for SSL server sockets, which must be done while | 61 // Enable support for SSL server sockets, which must be done while |
62 // single-threaded. | 62 // single-threaded. |
63 net::EnableSSLServerSockets(); | 63 net::EnableSSLServerSockets(); |
64 | 64 |
65 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 65 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
66 mojo::embedder::test::InitWithSimplePlatformSupport(); | 66 mojo::embedder::Init(); |
67 #endif | 67 #endif |
68 | 68 |
69 return base::LaunchUnitTests( | 69 return base::LaunchUnitTests( |
70 argc, argv, base::Bind(&NetTestSuite::Run, | 70 argc, argv, base::Bind(&NetTestSuite::Run, |
71 base::Unretained(&test_suite))); | 71 base::Unretained(&test_suite))); |
72 } | 72 } |
OLD | NEW |