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

Unified Diff: components/history/core/browser/visit_database_unittest.cc

Issue 1389923004: Fix the incorrectly named time points in VisitDatabaseTest.GetHistoryCount. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/visit_database_unittest.cc
diff --git a/components/history/core/browser/visit_database_unittest.cc b/components/history/core/browser/visit_database_unittest.cc
index 8074dd92c0ddf6315cc88381b825e337d81bfe8b..c1b14bf36bfcf0c68fd680d32db488b4141488f5 100644
--- a/components/history/core/browser/visit_database_unittest.cc
+++ b/components/history/core/browser/visit_database_unittest.cc
@@ -425,8 +425,8 @@ TEST_F(VisitDatabaseTest, GetHistoryCount) {
// round down to the beginning of the day in the local time, taking timezones
// and DST into account. This is necessary to achieve the same equivalence
// class on days as the DATE(..., 'localtime') function in SQL.
- Time yesterday = (today - TimeDelta::FromHours(36)).LocalMidnight();
- Time two_days_ago = (yesterday - TimeDelta::FromHours(36)).LocalMidnight();
+ Time yesterday = (today - TimeDelta::FromSeconds(1)).LocalMidnight();
sdefresne 2015/10/06 17:14:32 Will this work around day light saving change? Why
lwchkg 2015/10/07 04:59:37 Thanks for a good point. DST is simply very hard a
sdefresne 2015/10/07 07:42:54 Or you could fix that initial date instead of usin
sdefresne 2015/10/07 13:55:36 I was thinking of using a date known not to cause
msramek 2015/10/13 18:10:05 Ok, I fixed the date in the middle of the summer t
+ Time two_days_ago = (yesterday - TimeDelta::FromSeconds(1)).LocalMidnight();
Time now = two_days_ago;
ui::PageTransition standard_transition = ui::PageTransitionFromInt(
« 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