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
3 // found in the LICENSE file.
5 #include "base/metrics/statistics_recorder.h"
6 #include "build/build_config.h"
7 #include "crypto/nss_util.h"
8 #include "net/socket/client_socket_pool_base.h"
9 #include "net/socket/ssl_server_socket.h"
10 #include "net/spdy/spdy_session.h"
11 #include "net/test/net_test_suite.h"
13 #if defined(OS_ANDROID)
14 #include "base/android/jni_android.h"
15 #include "net/android/net_jni_registrar.h"
19 #include "net/proxy/proxy_resolver_v8.h"
22 using net::internal::ClientSocketPoolBaseHelper
;
23 using net::SpdySession
;
25 int main(int argc
, char** argv
) {
26 // Record histograms, so we can get histograms data in tests.
27 base::StatisticsRecorder::Initialize();
29 #if defined(OS_ANDROID)
30 // Register JNI bindings for android. Doing it early as the test suite setup
31 // may initiate a call to Java.
32 net::android::RegisterJni(base::android::AttachCurrentThread());
35 NetTestSuite
test_suite(argc
, argv
);
36 ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false);
39 // We want to be sure to init NSPR on the main thread.
40 crypto::EnsureNSPRInit();
43 // Enable support for SSL server sockets, which must be done while
45 net::EnableSSLServerSockets();
48 // This has to be done on the main thread.
49 net::ProxyResolverV8::RememberDefaultIsolate();
52 return test_suite
.Run();