From 8efa4ba4c13a470905289a4a1f13ecee2d62bf08 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Mon, 18 Mar 2013 21:14:14 +0000 Subject: net: move test files out of net/base BUG=70818 Review URL: https://codereview.chromium.org/12811011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188822 0039d316-1c4b-4281-b951-d872f2087c98 --- net/test/run_all_unittests.cc | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 net/test/run_all_unittests.cc (limited to 'net/test/run_all_unittests.cc') diff --git a/net/test/run_all_unittests.cc b/net/test/run_all_unittests.cc new file mode 100644 index 0000000..d8392ff --- /dev/null +++ b/net/test/run_all_unittests.cc @@ -0,0 +1,53 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/metrics/statistics_recorder.h" +#include "build/build_config.h" +#include "crypto/nss_util.h" +#include "net/socket/client_socket_pool_base.h" +#include "net/socket/ssl_server_socket.h" +#include "net/spdy/spdy_session.h" +#include "net/test/net_test_suite.h" + +#if defined(OS_ANDROID) +#include "base/android/jni_android.h" +#include "net/android/net_jni_registrar.h" +#endif + +#if !defined(OS_IOS) +#include "net/proxy/proxy_resolver_v8.h" +#endif + +using net::internal::ClientSocketPoolBaseHelper; +using net::SpdySession; + +int main(int argc, char** argv) { + // Record histograms, so we can get histograms data in tests. + base::StatisticsRecorder::Initialize(); + +#if defined(OS_ANDROID) + // Register JNI bindings for android. Doing it early as the test suite setup + // may initiate a call to Java. + net::android::RegisterJni(base::android::AttachCurrentThread()); +#endif + + NetTestSuite test_suite(argc, argv); + ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(false); + +#if defined(OS_WIN) + // We want to be sure to init NSPR on the main thread. + crypto::EnsureNSPRInit(); +#endif + + // Enable support for SSL server sockets, which must be done while + // single-threaded. + net::EnableSSLServerSockets(); + +#if !defined(OS_IOS) + // This has to be done on the main thread. + net::ProxyResolverV8::RememberDefaultIsolate(); +#endif + + return test_suite.Run(); +} -- cgit v1.1