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

Unified Diff: net/cert/internal/verify_certificate_chain_unittest.cc

Issue 2326923002: Introduce CertErrors::ToDebugString(). (Closed)
Patch Set: checkpoint 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
« no previous file with comments | « net/cert/internal/cert_errors.cc ('k') | net/data/verify_certificate_chain_unittest/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/verify_certificate_chain_unittest.cc
diff --git a/net/cert/internal/verify_certificate_chain_unittest.cc b/net/cert/internal/verify_certificate_chain_unittest.cc
index 06346b2f10445475d82cfac8de73f689b9af2a68..54b4357375e3a961f593299c5a7a2905f5053cd8 100644
--- a/net/cert/internal/verify_certificate_chain_unittest.cc
+++ b/net/cert/internal/verify_certificate_chain_unittest.cc
@@ -12,22 +12,6 @@ namespace net {
namespace {
-// Builds a string representation of all the errors/warnings, that matches the
-// format used in the test files. The format is described in
-// net/data/verify_certificate_chain_unittest/README.
-//
-// TODO(crbug.com/634443): Use a richer string format that includes the error
-// parameters and context.
-std::string MakeErrorsString(const CertErrors& errors) {
- std::string str;
- for (const auto& error : errors.errors()) {
- if (!str.empty())
- str += "\n";
- str += error.type;
- }
- return str;
-}
-
class VerifyCertificateChainDelegate {
public:
static void Verify(const ParsedCertificateList& chain,
@@ -43,7 +27,7 @@ class VerifyCertificateChainDelegate {
bool result = VerifyCertificateChain(chain, trust_anchor.get(),
&signature_policy, time, &errors);
EXPECT_EQ(expected_result, result);
- EXPECT_EQ(expected_errors, MakeErrorsString(errors));
+ EXPECT_EQ(expected_errors, errors.ToDebugString());
}
};
« no previous file with comments | « net/cert/internal/cert_errors.cc ('k') | net/data/verify_certificate_chain_unittest/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698