Chromium Code Reviews| 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 #include "net/request_throttler/request_throttler_manager.h" | |
| 9 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| 10 #include "net/socket/ssl_client_socket_nss_factory.h" | 11 #include "net/socket/ssl_client_socket_nss_factory.h" |
| 11 #endif | 12 #endif |
| 12 | 13 |
| 13 int main(int argc, char** argv) { | 14 int main(int argc, char** argv) { |
| 14 // Record histograms, so we can get histograms data in tests. | 15 // Record histograms, so we can get histograms data in tests. |
| 15 base::StatisticsRecorder recorder; | 16 base::StatisticsRecorder recorder; |
| 16 NetTestSuite test_suite(argc, argv); | 17 NetTestSuite test_suite(argc, argv); |
| 17 | 18 |
| 18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
| 19 // Use NSS for SSL on Windows. TODO(wtc): this should eventually be hidden | 20 // Use NSS for SSL on Windows. TODO(wtc): this should eventually be hidden |
| 20 // inside DefaultClientSocketFactory::CreateSSLClientSocket. | 21 // inside DefaultClientSocketFactory::CreateSSLClientSocket. |
| 21 net::ClientSocketFactory::SetSSLClientSocketFactory( | 22 net::ClientSocketFactory::SetSSLClientSocketFactory( |
| 22 net::SSLClientSocketNSSFactory); | 23 net::SSLClientSocketNSSFactory); |
| 23 // We want to be sure to init NSPR on the main thread. | 24 // We want to be sure to init NSPR on the main thread. |
| 24 base::EnsureNSPRInit(); | 25 base::EnsureNSPRInit(); |
| 25 #endif | 26 #endif |
| 26 | 27 |
| 28 Singleton<RequestThrottlerManager>::get()->DisableThrottlingByDefault(); | |
|
joi
2010/11/09 20:07:17
I'm a bit wary of this. Since we're trying to make
yzshen
2010/11/09 22:32:22
Yes, tests that deal with HTTP failures are a smal
| |
| 29 | |
| 27 return test_suite.Run(); | 30 return test_suite.Run(); |
| 28 } | 31 } |
| OLD | NEW |