OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "net/ocsp/nss_ocsp.h" | 5 #include "net/ocsp/nss_ocsp.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 public: | 71 public: |
72 NssHttpTest() | 72 NssHttpTest() |
73 : context_(false), | 73 : context_(false), |
74 handler_(NULL), | 74 handler_(NULL), |
75 verify_proc_(new CertVerifyProcNSS), | 75 verify_proc_(new CertVerifyProcNSS), |
76 verifier_(new MultiThreadedCertVerifier(verify_proc_.get())) {} | 76 verifier_(new MultiThreadedCertVerifier(verify_proc_.get())) {} |
77 virtual ~NssHttpTest() {} | 77 virtual ~NssHttpTest() {} |
78 | 78 |
79 virtual void SetUp() { | 79 virtual void SetUp() { |
80 std::string file_contents; | 80 std::string file_contents; |
81 ASSERT_TRUE(file_util::ReadFileToString( | 81 ASSERT_TRUE(base::ReadFileToString( |
82 GetTestCertsDirectory().AppendASCII("aia-intermediate.der"), | 82 GetTestCertsDirectory().AppendASCII("aia-intermediate.der"), |
83 &file_contents)); | 83 &file_contents)); |
84 ASSERT_FALSE(file_contents.empty()); | 84 ASSERT_FALSE(file_contents.empty()); |
85 | 85 |
86 // Ownership of |handler| is transferred to the URLRequestFilter, but | 86 // Ownership of |handler| is transferred to the URLRequestFilter, but |
87 // hold onto the original pointer in order to access |request_count()|. | 87 // hold onto the original pointer in order to access |request_count()|. |
88 scoped_ptr<AiaResponseHandler> handler( | 88 scoped_ptr<AiaResponseHandler> handler( |
89 new AiaResponseHandler(kAiaHeaders, file_contents)); | 89 new AiaResponseHandler(kAiaHeaders, file_contents)); |
90 handler_ = handler.get(); | 90 handler_ = handler.get(); |
91 | 91 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 error = test_callback.WaitForResult(); | 155 error = test_callback.WaitForResult(); |
156 | 156 |
157 EXPECT_EQ(OK, error); | 157 EXPECT_EQ(OK, error); |
158 | 158 |
159 // Ensure that NSS made an AIA request for the missing intermediate. | 159 // Ensure that NSS made an AIA request for the missing intermediate. |
160 EXPECT_LT(0, request_count()); | 160 EXPECT_LT(0, request_count()); |
161 } | 161 } |
162 | 162 |
163 } // namespace net | 163 } // namespace net |
OLD | NEW |