summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 17:21:32 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 17:21:32 +0000
commitd82abb94f16cb209b991748142ea2f4737dbb8fc (patch)
tree91496c7c7290f39c64c2a6de61d2cfe9b3e934ad /net/base
parentb5f7da0bc4c1d77e6496c733a2df11f66b566008 (diff)
downloadchromium_src-d82abb94f16cb209b991748142ea2f4737dbb8fc.zip
chromium_src-d82abb94f16cb209b991748142ea2f4737dbb8fc.tar.gz
chromium_src-d82abb94f16cb209b991748142ea2f4737dbb8fc.tar.bz2
Always use NSS for SSL on Windows in net_unittests.exe.
R=agl,willchan BUG=43142 TEST=All unit tests should pass on Windows. Review URL: http://codereview.chromium.org/1942002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/run_all_unittests.cc44
1 files changed, 16 insertions, 28 deletions
diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc
index 9786f6e..c53254b 100644
--- a/net/base/run_all_unittests.cc
+++ b/net/base/run_all_unittests.cc
@@ -1,39 +1,27 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Copyright (c) 2010 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/histogram.h"
#include "net/base/net_test_suite.h"
+#if defined(OS_WIN)
+#include "net/socket/ssl_client_socket_nss_factory.h"
+#endif
int main(int argc, char** argv) {
// Record histograms, so we can get histograms data in tests.
StatisticsRecorder recorder;
NetTestSuite test_suite(argc, argv);
+
+#if defined(OS_WIN)
+ // Use NSS for SSL on Windows. TODO(wtc): this should eventually be hidden
+ // inside DefaultClientSocketFactory::CreateSSLClientSocket.
+ net::ClientSocketFactory::SetSSLClientSocketFactory(
+ net::SSLClientSocketNSSFactory);
+ // We want to be sure to init NSPR on the main thread.
+ base::EnsureNSPRInit();
+#endif
+
// TODO(phajdan.jr): Enforce test isolation, http://crbug.com/12710.
return test_suite.Run();
}