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

Unified Diff: chrome/browser/budget_service/budget_database_unittest.cc

Issue 2934063002: Always use milliseconds in the Budget API implementation (Closed)
Patch Set: Created 3 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: chrome/browser/budget_service/budget_database_unittest.cc
diff --git a/chrome/browser/budget_service/budget_database_unittest.cc b/chrome/browser/budget_service/budget_database_unittest.cc
index 3d5bf2ac9dbd7676f3d8a70970616bf278c1ab1a..e4f0c1239e148f31e9dc6deeb0f959cb3638dd39 100644
--- a/chrome/browser/budget_service/budget_database_unittest.cc
+++ b/chrome/browser/budget_service/budget_database_unittest.cc
@@ -133,7 +133,7 @@ TEST_F(BudgetDatabaseTest, AddEngagementBudgetTest) {
ASSERT_DOUBLE_EQ(daily_budget * kDefaultExpirationInDays,
prediction_[0]->budget_at);
ASSERT_EQ(0, prediction_[1]->budget_at);
- ASSERT_EQ(expiration_time.ToDoubleT(), prediction_[1]->time);
+ ASSERT_EQ(expiration_time.ToJsTime(), prediction_[1]->time);
// Advance time 1 day and add more engagement budget.
clock->Advance(base::TimeDelta::FromDays(1));
@@ -145,9 +145,9 @@ TEST_F(BudgetDatabaseTest, AddEngagementBudgetTest) {
ASSERT_DOUBLE_EQ(daily_budget * (kDefaultExpirationInDays + 1),
prediction_[0]->budget_at);
ASSERT_DOUBLE_EQ(daily_budget, prediction_[1]->budget_at);
- ASSERT_EQ(expiration_time.ToDoubleT(), prediction_[1]->time);
+ ASSERT_EQ(expiration_time.ToJsTime(), prediction_[1]->time);
ASSERT_DOUBLE_EQ(0, prediction_[2]->budget_at);
- ASSERT_EQ((expiration_time + base::TimeDelta::FromDays(1)).ToDoubleT(),
+ ASSERT_EQ((expiration_time + base::TimeDelta::FromDays(1)).ToJsTime(),
prediction_[2]->time);
// Advance time by 59 minutes and check that no engagement budget is added
« no previous file with comments | « chrome/browser/budget_service/budget_database.cc ('k') | chrome/browser/budget_service/budget_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698