| 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 "net/base/multi_threaded_cert_verifier.h" | 5 #include "net/cert/multi_threaded_cert_verifier.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| 11 #include "net/base/cert_test_util.h" | |
| 12 #include "net/base/cert_trust_anchor_provider.h" | |
| 13 #include "net/base/cert_verify_proc.h" | |
| 14 #include "net/base/cert_verify_result.h" | |
| 15 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" |
| 16 #include "net/base/net_log.h" | 12 #include "net/base/net_log.h" |
| 17 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
| 18 #include "net/base/test_data_directory.h" | 14 #include "net/base/test_data_directory.h" |
| 19 #include "net/base/x509_certificate.h" | 15 #include "net/cert/cert_trust_anchor_provider.h" |
| 16 #include "net/cert/cert_verify_proc.h" |
| 17 #include "net/cert/cert_verify_result.h" |
| 18 #include "net/cert/x509_certificate.h" |
| 19 #include "net/test/cert_test_util.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using testing::Mock; | 23 using testing::Mock; |
| 24 using testing::ReturnRef; | 24 using testing::ReturnRef; |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 Mock::VerifyAndClearExpectations(&trust_provider); | 410 Mock::VerifyAndClearExpectations(&trust_provider); |
| 411 ASSERT_EQ(ERR_IO_PENDING, error); | 411 ASSERT_EQ(ERR_IO_PENDING, error); |
| 412 ASSERT_TRUE(request_handle != NULL); | 412 ASSERT_TRUE(request_handle != NULL); |
| 413 error = callback.WaitForResult(); | 413 error = callback.WaitForResult(); |
| 414 EXPECT_EQ(ERR_CERT_COMMON_NAME_INVALID, error); | 414 EXPECT_EQ(ERR_CERT_COMMON_NAME_INVALID, error); |
| 415 ASSERT_EQ(3u, verifier_.requests()); | 415 ASSERT_EQ(3u, verifier_.requests()); |
| 416 ASSERT_EQ(1u, verifier_.cache_hits()); | 416 ASSERT_EQ(1u, verifier_.cache_hits()); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace net | 419 } // namespace net |
| OLD | NEW |