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

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

Issue 2346663002: Generalize rebase-errors.py so it works for other files. (Closed)
Patch Set: moar comment wording 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/test_helpers.h ('k') | net/cert/internal/trust_store_collection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/test_helpers.cc
diff --git a/net/cert/internal/test_helpers.cc b/net/cert/internal/test_helpers.cc
index 8413772d698c7437e47967436927dda07447c6ec..2b87e49d866e4d85b984d77abe923dbcb380741e 100644
--- a/net/cert/internal/test_helpers.cc
+++ b/net/cert/internal/test_helpers.cc
@@ -101,7 +101,7 @@ der::Input SequenceValueFromString(const std::string* s) {
return ::testing::AssertionSuccess();
}
-void ReadVerifyCertChainTestFromFile(const std::string& file_name,
+void ReadVerifyCertChainTestFromFile(const std::string& file_path_ascii,
ParsedCertificateList* chain,
scoped_refptr<TrustAnchor>* trust_anchor,
der::GeneralizedTime* time,
@@ -111,8 +111,7 @@ void ReadVerifyCertChainTestFromFile(const std::string& file_name,
*trust_anchor = nullptr;
expected_errors->clear();
- std::string file_data = ReadTestFileToString(
- std::string("net/data/verify_certificate_chain_unittest/") + file_name);
+ std::string file_data = ReadTestFileToString(file_path_ascii);
std::vector<std::string> pem_headers;
@@ -180,11 +179,11 @@ void ReadVerifyCertChainTestFromFile(const std::string& file_name,
ASSERT_TRUE(*trust_anchor);
}
-std::string ReadTestFileToString(const std::string& file_name) {
+std::string ReadTestFileToString(const std::string& file_path_ascii) {
// Compute the full path, relative to the src/ directory.
base::FilePath src_root;
PathService::Get(base::DIR_SOURCE_ROOT, &src_root);
- base::FilePath filepath = src_root.AppendASCII(file_name);
+ base::FilePath filepath = src_root.AppendASCII(file_path_ascii);
// Read the full contents of the file.
std::string file_data;
« no previous file with comments | « net/cert/internal/test_helpers.h ('k') | net/cert/internal/trust_store_collection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698