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

Unified Diff: components/search_engines/default_search_manager_unittest.cc

Issue 2498053002: Add field to monitor last visited time for each search engine (Closed)
Patch Set: Update Nit comment. Created 4 years 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 | « components/search_engines/default_search_manager.cc ('k') | components/search_engines/keyword_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/default_search_manager_unittest.cc
diff --git a/components/search_engines/default_search_manager_unittest.cc b/components/search_engines/default_search_manager_unittest.cc
index f2a58e6c904f2ef9d760821df29c3521f9b917e6..01fcb79dd778e5f5b23d31d8a96b1f995208b039 100644
--- a/components/search_engines/default_search_manager_unittest.cc
+++ b/components/search_engines/default_search_manager_unittest.cc
@@ -29,8 +29,8 @@ namespace {
const char kDefaultSearchProviderData[] =
"default_search_provider_data.template_url_data";
-// Checks that the two TemplateURLs are similar. Does not check the id, the
-// date_created or the last_modified time. Neither pointer should be NULL.
+// Checks that the two TemplateURLs are similar. Does not check the id or
+// any time-related fields. Neither pointer should be null.
void ExpectSimilar(const TemplateURLData* expected,
const TemplateURLData* actual) {
ASSERT_TRUE(expected != NULL);
@@ -111,6 +111,7 @@ std::unique_ptr<TemplateURLData> GenerateDummyTemplateURLData(
"UTF-8;UTF-16", ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
data->date_created = base::Time();
data->last_modified = base::Time();
+ data->last_visited = base::Time();
return data;
}
@@ -152,6 +153,7 @@ TEST_F(DefaultSearchManagerTest, ReadAndWritePref) {
"UTF-8;UTF-16", ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
data.date_created = base::Time();
data.last_modified = base::Time();
+ data.last_modified = base::Time();
manager.SetUserSelectedDefaultSearchEngine(data);
TemplateURLData* read_data = manager.GetDefaultSearchEngine(NULL);
« no previous file with comments | « components/search_engines/default_search_manager.cc ('k') | components/search_engines/keyword_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698