Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: net/cert/multi_threaded_cert_verifier_unittest.cc

Issue 663043004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/multi_log_ct_verifier_unittest.cc ('k') | net/cert/nss_cert_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cert/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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual ~MockCertTrustAnchorProvider() {} 60 virtual ~MockCertTrustAnchorProvider() {}
61 61
62 MOCK_METHOD0(GetAdditionalTrustAnchors, const CertificateList&()); 62 MOCK_METHOD0(GetAdditionalTrustAnchors, const CertificateList&());
63 }; 63 };
64 64
65 } // namespace 65 } // namespace
66 66
67 class MultiThreadedCertVerifierTest : public ::testing::Test { 67 class MultiThreadedCertVerifierTest : public ::testing::Test {
68 public: 68 public:
69 MultiThreadedCertVerifierTest() : verifier_(new MockCertVerifyProc()) {} 69 MultiThreadedCertVerifierTest() : verifier_(new MockCertVerifyProc()) {}
70 virtual ~MultiThreadedCertVerifierTest() {} 70 ~MultiThreadedCertVerifierTest() override {}
71 71
72 protected: 72 protected:
73 MultiThreadedCertVerifier verifier_; 73 MultiThreadedCertVerifier verifier_;
74 }; 74 };
75 75
76 TEST_F(MultiThreadedCertVerifierTest, CacheHit) { 76 TEST_F(MultiThreadedCertVerifierTest, CacheHit) {
77 base::FilePath certs_dir = GetTestCertsDirectory(); 77 base::FilePath certs_dir = GetTestCertsDirectory();
78 scoped_refptr<X509Certificate> test_cert( 78 scoped_refptr<X509Certificate> test_cert(
79 ImportCertFromFile(certs_dir, "ok_cert.pem")); 79 ImportCertFromFile(certs_dir, "ok_cert.pem"));
80 ASSERT_NE(static_cast<X509Certificate*>(NULL), test_cert.get()); 80 ASSERT_NE(static_cast<X509Certificate*>(NULL), test_cert.get());
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 Mock::VerifyAndClearExpectations(&trust_provider); 474 Mock::VerifyAndClearExpectations(&trust_provider);
475 ASSERT_EQ(ERR_IO_PENDING, error); 475 ASSERT_EQ(ERR_IO_PENDING, error);
476 EXPECT_TRUE(request_handle); 476 EXPECT_TRUE(request_handle);
477 error = callback.WaitForResult(); 477 error = callback.WaitForResult();
478 EXPECT_EQ(ERR_CERT_COMMON_NAME_INVALID, error); 478 EXPECT_EQ(ERR_CERT_COMMON_NAME_INVALID, error);
479 ASSERT_EQ(3u, verifier_.requests()); 479 ASSERT_EQ(3u, verifier_.requests());
480 ASSERT_EQ(1u, verifier_.cache_hits()); 480 ASSERT_EQ(1u, verifier_.cache_hits());
481 } 481 }
482 482
483 } // namespace net 483 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/multi_log_ct_verifier_unittest.cc ('k') | net/cert/nss_cert_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698