| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 #include "base/metrics/histogram.h" | 6 #include "base/metrics/histogram.h" |
| 7 #include "base/nss_util.h" | 7 #include "base/nss_util.h" |
| 8 #include "net/base/net_test_suite.h" | 8 #include "net/base/net_test_suite.h" |
| 9 #if defined(OS_WIN) | |
| 10 #include "net/socket/ssl_client_socket_nss_factory.h" | |
| 11 #endif | |
| 12 | 9 |
| 13 int main(int argc, char** argv) { | 10 int main(int argc, char** argv) { |
| 14 // Record histograms, so we can get histograms data in tests. | 11 // Record histograms, so we can get histograms data in tests. |
| 15 base::StatisticsRecorder recorder; | 12 base::StatisticsRecorder recorder; |
| 16 NetTestSuite test_suite(argc, argv); | 13 NetTestSuite test_suite(argc, argv); |
| 17 | 14 |
| 18 #if defined(OS_WIN) | 15 #if defined(OS_WIN) |
| 19 // Use NSS for SSL on Windows. TODO(wtc): this should eventually be hidden | |
| 20 // inside DefaultClientSocketFactory::CreateSSLClientSocket. | |
| 21 net::ClientSocketFactory::SetSSLClientSocketFactory( | |
| 22 net::SSLClientSocketNSSFactory); | |
| 23 // We want to be sure to init NSPR on the main thread. | 16 // We want to be sure to init NSPR on the main thread. |
| 24 base::EnsureNSPRInit(); | 17 base::EnsureNSPRInit(); |
| 25 #endif | 18 #endif |
| 26 | 19 |
| 27 return test_suite.Run(); | 20 return test_suite.Run(); |
| 28 } | 21 } |
| OLD | NEW |