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

Unified Diff: components/ssl_errors/error_classification_unittest.cc

Issue 2532273003: Fix flaky GetClockState test (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ssl_errors/error_classification_unittest.cc
diff --git a/components/ssl_errors/error_classification_unittest.cc b/components/ssl_errors/error_classification_unittest.cc
index 0081a0d4d4c3620a0e907b991ffae981c7ac8a8b..93b4c7162326ea35cf61950533692dbc0bee8c84 100644
--- a/components/ssl_errors/error_classification_unittest.cc
+++ b/components/ssl_errors/error_classification_unittest.cc
@@ -213,8 +213,7 @@ TEST(ErrorClassification, LevenshteinDistance) {
EXPECT_EQ(7u, ssl_errors::GetLevenshteinDistance("xxxxxxx", "yyy"));
}
-// Flaky, see https://bugs.chromium.org/p/chromium/issues/detail?id=668539.
-TEST_F(SSLErrorClassificationTest, DISABLED_GetClockState) {
+TEST_F(SSLErrorClassificationTest, GetClockState) {
// This test aims to obtain all possible return values of
// |GetClockState|.
const char kBuildTimeHistogram[] = "interstitial.ssl.clockstate.build_time";
@@ -230,6 +229,7 @@ TEST_F(SSLErrorClassificationTest, DISABLED_GetClockState) {
new net::TestURLRequestContextGetter(
base::ThreadTaskRunnerHandle::Get()));
+ ssl_errors::SetBuildTimeForTesting(base::Time::Now());
EXPECT_EQ(
ssl_errors::ClockState::CLOCK_STATE_UNKNOWN,
ssl_errors::GetClockState(base::Time::Now(), &network_time_tracker));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698