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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc

Issue 2759423003: [UserClassifier] Inject a clock (Closed)
Patch Set: Created 3 years, 9 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/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
index 68243166726c6e051055dfdf1c6d6eb6339bfc2d..6ef68515fa97c81a579ceb1efe3c1fd8fa3b6431 100644
--- a/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc
@@ -16,6 +16,7 @@
#include "base/test/histogram_tester.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/ntp_snippets/category.h"
@@ -280,7 +281,8 @@ class RemoteSuggestionsFetcherTestBase : public testing::Test {
mock_task_runner_handle_(mock_task_runner_),
test_url_(gurl) {
UserClassifier::RegisterProfilePrefs(utils_.pref_service()->registry());
- user_classifier_ = base::MakeUnique<UserClassifier>(utils_.pref_service());
+ user_classifier_ = base::MakeUnique<UserClassifier>(
+ utils_.pref_service(), base::MakeUnique<base::DefaultClock>());
// Increase initial time such that ticks are non-zero.
mock_task_runner_->FastForwardBy(base::TimeDelta::FromMilliseconds(1234));
ResetFetcher();

Powered by Google App Engine
This is Rietveld 408576698