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