| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/cert/caching_cert_verifier.h" | 5 #include "net/cert/caching_cert_verifier.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 13 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
| 14 #include "net/base/test_data_directory.h" | |
| 15 #include "net/cert/cert_verifier.h" | 14 #include "net/cert/cert_verifier.h" |
| 16 #include "net/cert/cert_verify_result.h" | 15 #include "net/cert/cert_verify_result.h" |
| 17 #include "net/cert/mock_cert_verifier.h" | 16 #include "net/cert/mock_cert_verifier.h" |
| 18 #include "net/cert/x509_certificate.h" | 17 #include "net/cert/x509_certificate.h" |
| 19 #include "net/log/net_log.h" | 18 #include "net/log/net_log.h" |
| 20 #include "net/test/cert_test_util.h" | 19 #include "net/test/cert_test_util.h" |
| 20 #include "net/test/test_data_directory.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 | 23 |
| 24 using testing::_; | 24 using testing::_; |
| 25 using testing::Mock; | 25 using testing::Mock; |
| 26 using testing::Return; | 26 using testing::Return; |
| 27 using testing::ReturnRef; | 27 using testing::ReturnRef; |
| 28 | 28 |
| 29 namespace net { | 29 namespace net { |
| 30 | 30 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 CertVerifier::RequestParams(cert_chain2, "www.example.com", 0, | 263 CertVerifier::RequestParams(cert_chain2, "www.example.com", 0, |
| 264 std::string(), CertificateList()), | 264 std::string(), CertificateList()), |
| 265 nullptr, &verify_result, callback.callback(), &request, BoundNetLog())); | 265 nullptr, &verify_result, callback.callback(), &request, BoundNetLog())); |
| 266 ASSERT_TRUE(IsCertificateError(error)); | 266 ASSERT_TRUE(IsCertificateError(error)); |
| 267 ASSERT_EQ(2u, verifier_.requests()); | 267 ASSERT_EQ(2u, verifier_.requests()); |
| 268 ASSERT_EQ(0u, verifier_.cache_hits()); | 268 ASSERT_EQ(0u, verifier_.cache_hits()); |
| 269 ASSERT_EQ(2u, verifier_.GetCacheSize()); | 269 ASSERT_EQ(2u, verifier_.GetCacheSize()); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace net | 272 } // namespace net |
| OLD | NEW |