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

Unified Diff: net/cert/multi_log_ct_verifier_unittest.cc

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: REBASE Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: net/cert/multi_log_ct_verifier_unittest.cc
diff --git a/net/cert/multi_log_ct_verifier_unittest.cc b/net/cert/multi_log_ct_verifier_unittest.cc
index 05af2d227deddaba09bda93c3cc43b865d9189a5..7c2b269d56559c87fa25542c0d200b82d7a5f4de 100644
--- a/net/cert/multi_log_ct_verifier_unittest.cc
+++ b/net/cert/multi_log_ct_verifier_unittest.cc
@@ -112,7 +112,7 @@ class MultiLogCTVerifierTest : public ::testing::Test {
}
bool VerifySinglePrecertificateChain(scoped_refptr<X509Certificate> chain,
- const BoundNetLog& bound_net_log,
+ const NetLogWithSource& bound_net_log,
ct::CTVerifyResult* result) {
return verifier_->Verify(chain.get(),
std::string(),
@@ -124,8 +124,8 @@ class MultiLogCTVerifierTest : public ::testing::Test {
bool VerifySinglePrecertificateChain(scoped_refptr<X509Certificate> chain) {
ct::CTVerifyResult result;
TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::CONNECT_JOB);
+ NetLogWithSource bound_net_log =
+ NetLogWithSource::Make(&net_log, NetLogSourceType::CONNECT_JOB);
return verifier_->Verify(chain.get(),
std::string(),
@@ -137,8 +137,8 @@ class MultiLogCTVerifierTest : public ::testing::Test {
bool CheckPrecertificateVerification(scoped_refptr<X509Certificate> chain) {
ct::CTVerifyResult result;
TestNetLog net_log;
- BoundNetLog bound_net_log =
- BoundNetLog::Make(&net_log, NetLogSourceType::CONNECT_JOB);
+ NetLogWithSource bound_net_log =
+ NetLogWithSource::Make(&net_log, NetLogSourceType::CONNECT_JOB);
return (VerifySinglePrecertificateChain(chain, bound_net_log, &result) &&
ct::CheckForSingleVerifiedSCTInResult(result, kLogDescription) &&
ct::CheckForSCTOrigin(
@@ -217,9 +217,8 @@ TEST_F(MultiLogCTVerifierTest, VerifiesSCTOverX509Cert) {
std::string sct_list = ct::GetSCTListForTesting();
ct::CTVerifyResult result;
- EXPECT_EQ(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_EQ(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
ASSERT_TRUE(ct::CheckForSingleVerifiedSCTInResult(result, kLogDescription));
ASSERT_TRUE(ct::CheckForSCTOrigin(
result, ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION));
@@ -229,9 +228,8 @@ TEST_F(MultiLogCTVerifierTest, IdentifiesSCTFromUnknownLog) {
std::string sct_list = ct::GetSCTListWithInvalidSCT();
ct::CTVerifyResult result;
- EXPECT_NE(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_NE(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
EXPECT_EQ(1U, result.scts.size());
EXPECT_EQ("", result.scts[0].sct->log_description);
EXPECT_EQ(ct::SCT_STATUS_LOG_UNKNOWN, result.scts[0].status);
@@ -252,9 +250,8 @@ TEST_F(MultiLogCTVerifierTest, CountsInvalidSCTsInStatusHistogram) {
int num_invalid_scts = GetValueFromHistogram(
"Net.CertificateTransparency.SCTStatus", ct::SCT_STATUS_LOG_UNKNOWN);
- EXPECT_NE(OK,
- verifier_->Verify(
- chain_.get(), std::string(), sct_list, &result, BoundNetLog()));
+ EXPECT_NE(OK, verifier_->Verify(chain_.get(), std::string(), sct_list,
+ &result, NetLogWithSource()));
ASSERT_EQ(num_valid_scts, NumValidSCTsInStatusHistogram());
ASSERT_EQ(num_invalid_scts + 1,

Powered by Google App Engine
This is Rietveld 408576698