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

Unified Diff: components/cast_certificate/cast_cert_validator_unittest.cc

Issue 2050983002: Cast device revocation checking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: For review Created 4 years, 6 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: components/cast_certificate/cast_cert_validator_unittest.cc
diff --git a/components/cast_certificate/cast_cert_validator_unittest.cc b/components/cast_certificate/cast_cert_validator_unittest.cc
index 37999427ebf0a4c8f82ec7e5817e7c4300f227f9..122a2c6452e0c278a352b7ce48c90db71f428ac2 100644
--- a/components/cast_certificate/cast_cert_validator_unittest.cc
+++ b/components/cast_certificate/cast_cert_validator_unittest.cc
@@ -88,26 +88,17 @@ void RunTest(TestResult expected_result,
}
}
-// Creates a time in UTC at midnight.
-base::Time::Exploded CreateDate(int year, int month, int day) {
- base::Time::Exploded time = {0};
- time.year = year;
- time.month = month;
- time.day_of_month = day;
- return time;
-}
-
// Returns 2016-04-01 00:00:00 UTC.
//
// This is a time when most of the test certificate paths are
// valid.
base::Time::Exploded AprilFirst2016() {
- return CreateDate(2016, 4, 1);
+ return cast_certificate::testing::CreateDate(2016, 4, 1);
}
// Returns 2015-01-01 00:00:00 UTC.
base::Time::Exploded JanuaryFirst2015() {
- return CreateDate(2015, 1, 1);
+ return cast_certificate::testing::CreateDate(2015, 1, 1);
}
// Returns 2040-03-01 00:00:00 UTC.
@@ -115,7 +106,7 @@ base::Time::Exploded JanuaryFirst2015() {
// This is so far in the future that the test chains in this unit-test
// should all be invalid.
base::Time::Exploded MarchFirst2040() {
- return CreateDate(2040, 3, 1);
+ return cast_certificate::testing::CreateDate(2040, 3, 1);
}
// Tests verifying a valid certificate chain of length 2:

Powered by Google App Engine
This is Rietveld 408576698