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

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

Issue 2360953002: Add some more TODOs for places to instrument certificate errors. (Closed)
Patch Set: 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 | « no previous file | net/cert/internal/verify_certificate_chain_pkits_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/signature_algorithm_unittest.cc
diff --git a/net/cert/internal/signature_algorithm_unittest.cc b/net/cert/internal/signature_algorithm_unittest.cc
index ecaa7ced06eb62be45465886cb6a4ea453a947d4..2c124ada0d6e00e5c6cd331dcea626f52a815937 100644
--- a/net/cert/internal/signature_algorithm_unittest.cc
+++ b/net/cert/internal/signature_algorithm_unittest.cc
@@ -24,19 +24,25 @@ namespace {
template <size_t N>
bool ParseDer(const uint8_t (&data)[N],
std::unique_ptr<SignatureAlgorithm>* out) {
- // TODO(crbug.com/634443): Test the errors.
CertErrors errors;
*out = SignatureAlgorithm::Create(der::Input(data, N), &errors);
- return !!*out;
+ bool success = !!*out;
+
+ // TODO(crbug.com/634443): Test the errors.
+ // if (!success)
+ // EXPECT_FALSE(errors.empty());
+
+ return success;
}
// Parses a SignatureAlgorithm given an empty DER input.
TEST(SignatureAlgorithmTest, ParseDerEmpty) {
- // TODO(crbug.com/634443): Test the errors.
CertErrors errors;
std::unique_ptr<SignatureAlgorithm> algorithm =
SignatureAlgorithm::Create(der::Input(), &errors);
ASSERT_FALSE(algorithm);
+ // TODO(crbug.com/634443): Test the errors.
+ // EXPECT_FALSE(errors.empty());
}
// Parses a SignatureAlgorithm given invalid DER input.
« no previous file with comments | « no previous file | net/cert/internal/verify_certificate_chain_pkits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698