| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/certificate_reporting/error_report.h" | 5 #include "components/certificate_reporting/error_report.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 using net::SSLInfo; | 34 using net::SSLInfo; |
| 35 using testing::UnorderedElementsAre; | 35 using testing::UnorderedElementsAre; |
| 36 using testing::UnorderedElementsAreArray; | 36 using testing::UnorderedElementsAreArray; |
| 37 | 37 |
| 38 namespace certificate_reporting { | 38 namespace certificate_reporting { |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 const char kDummyHostname[] = "dummy.hostname.com"; | 42 const char kDummyHostname[] = "dummy.hostname.com"; |
| 43 const char kDummyFailureLog[] = "dummy failure log"; | 43 const char kDummyFailureLog[] = "dummy failure log"; |
| 44 const char kTestCertFilename[] = "test_mail_google_com.pem"; | 44 const char kTestCertFilename[] = "ok_cert.pem"; |
| 45 | 45 |
| 46 const net::CertStatus kCertStatus = | 46 const net::CertStatus kCertStatus = |
| 47 net::CERT_STATUS_COMMON_NAME_INVALID | net::CERT_STATUS_REVOKED; | 47 net::CERT_STATUS_COMMON_NAME_INVALID | net::CERT_STATUS_REVOKED; |
| 48 | 48 |
| 49 const CertLoggerRequest::CertError kFirstReportedCertError = | 49 const CertLoggerRequest::CertError kFirstReportedCertError = |
| 50 CertLoggerRequest::ERR_CERT_COMMON_NAME_INVALID; | 50 CertLoggerRequest::ERR_CERT_COMMON_NAME_INVALID; |
| 51 const CertLoggerRequest::CertError kSecondReportedCertError = | 51 const CertLoggerRequest::CertError kSecondReportedCertError = |
| 52 CertLoggerRequest::ERR_CERT_REVOKED; | 52 CertLoggerRequest::ERR_CERT_REVOKED; |
| 53 | 53 |
| 54 // Whether to include an unverified certificate chain in the test | 54 // Whether to include an unverified certificate chain in the test |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 CertLoggerRequest parsed; | 253 CertLoggerRequest parsed; |
| 254 ASSERT_TRUE(parsed.ParseFromString(serialized_report)); | 254 ASSERT_TRUE(parsed.ParseFromString(serialized_report)); |
| 255 EXPECT_EQ(CertLoggerFeaturesInfo::ANDROID_AIA_FETCHING_ENABLED, | 255 EXPECT_EQ(CertLoggerFeaturesInfo::ANDROID_AIA_FETCHING_ENABLED, |
| 256 parsed.features_info().android_aia_fetching_status()); | 256 parsed.features_info().android_aia_fetching_status()); |
| 257 } | 257 } |
| 258 #endif | 258 #endif |
| 259 | 259 |
| 260 } // namespace | 260 } // namespace |
| 261 | 261 |
| 262 } // namespace certificate_reporting | 262 } // namespace certificate_reporting |
| OLD | NEW |