OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #endif | 10 #endif |
(...skipping 7229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7240 kOCSPTestCertFingerprint, | 7240 kOCSPTestCertFingerprint, |
7241 kOCSPTestCertPolicy)) { | 7241 kOCSPTestCertPolicy)) { |
7242 } | 7242 } |
7243 | 7243 |
7244 virtual void SetUp() OVERRIDE { | 7244 virtual void SetUp() OVERRIDE { |
7245 SetupContext(&context_); | 7245 SetupContext(&context_); |
7246 context_.Init(); | 7246 context_.Init(); |
7247 | 7247 |
7248 scoped_refptr<X509Certificate> root_cert = | 7248 scoped_refptr<X509Certificate> root_cert = |
7249 ImportCertFromFile(GetTestCertsDirectory(), "ocsp-test-root.pem"); | 7249 ImportCertFromFile(GetTestCertsDirectory(), "ocsp-test-root.pem"); |
7250 CHECK_NE(static_cast<X509Certificate*>(NULL), root_cert); | 7250 CHECK_NE(static_cast<X509Certificate*>(NULL), root_cert.get()); |
7251 test_root_.reset(new ScopedTestRoot(root_cert.get())); | 7251 test_root_.reset(new ScopedTestRoot(root_cert.get())); |
7252 | 7252 |
7253 #if defined(USE_NSS) || defined(OS_IOS) | 7253 #if defined(USE_NSS) || defined(OS_IOS) |
7254 SetURLRequestContextForNSSHttpIO(&context_); | 7254 SetURLRequestContextForNSSHttpIO(&context_); |
7255 EnsureNSSHttpIOInit(); | 7255 EnsureNSSHttpIOInit(); |
7256 #endif | 7256 #endif |
7257 } | 7257 } |
7258 | 7258 |
7259 void DoConnection(const SpawnedTestServer::SSLOptions& ssl_options, | 7259 void DoConnection(const SpawnedTestServer::SSLOptions& ssl_options, |
7260 CertStatus* out_cert_status) { | 7260 CertStatus* out_cert_status) { |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8041 | 8041 |
8042 EXPECT_FALSE(r->is_pending()); | 8042 EXPECT_FALSE(r->is_pending()); |
8043 EXPECT_EQ(1, d->response_started_count()); | 8043 EXPECT_EQ(1, d->response_started_count()); |
8044 EXPECT_FALSE(d->received_data_before_response()); | 8044 EXPECT_FALSE(d->received_data_before_response()); |
8045 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 8045 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
8046 } | 8046 } |
8047 } | 8047 } |
8048 #endif // !defined(DISABLE_FTP_SUPPORT) | 8048 #endif // !defined(DISABLE_FTP_SUPPORT) |
8049 | 8049 |
8050 } // namespace net | 8050 } // namespace net |
OLD | NEW |