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

Unified Diff: chrome/browser/search_engines/default_search_pref_migration_unittest.cc

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 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/search_engines/default_search_pref_migration_unittest.cc
diff --git a/chrome/browser/search_engines/default_search_pref_migration_unittest.cc b/chrome/browser/search_engines/default_search_pref_migration_unittest.cc
index c4f0261624ed2ed71d3088cd9426cc7b3442fc58..d78010d1644f32088f428365f6178031073451c7 100644
--- a/chrome/browser/search_engines/default_search_pref_migration_unittest.cc
+++ b/chrome/browser/search_engines/default_search_pref_migration_unittest.cc
@@ -139,7 +139,7 @@ scoped_ptr<TemplateURL> DefaultSearchPrefMigrationTest::CreateKeyword(
const std::string& keyword,
const std::string& url) {
TemplateURLData data;
- data.short_name = base::ASCIIToUTF16(short_name);
+ data.SetShortName(base::ASCIIToUTF16(short_name));
data.SetKeyword(base::ASCIIToUTF16(keyword));
data.SetURL(url);
scoped_ptr<TemplateURL> t_url(new TemplateURL(data));
@@ -161,7 +161,7 @@ TEST_F(DefaultSearchPrefMigrationTest, MigrateUserSelectedValue) {
default_search_manager()->GetDefaultSearchEngine(&source);
ASSERT_TRUE(modern_default);
EXPECT_EQ(DefaultSearchManager::FROM_USER, source);
- EXPECT_EQ(t_url->short_name(), modern_default->short_name);
+ EXPECT_EQ(t_url->short_name(), modern_default->short_name());
EXPECT_EQ(t_url->keyword(), modern_default->keyword());
EXPECT_EQ(t_url->url(), modern_default->url());
}
@@ -181,7 +181,7 @@ TEST_F(DefaultSearchPrefMigrationTest, MigrateOnlyOnce) {
default_search_manager()->GetDefaultSearchEngine(&source);
ASSERT_TRUE(modern_default);
EXPECT_EQ(DefaultSearchManager::FROM_USER, source);
- EXPECT_EQ(t_url->short_name(), modern_default->short_name);
+ EXPECT_EQ(t_url->short_name(), modern_default->short_name());
EXPECT_EQ(t_url->keyword(), modern_default->keyword());
EXPECT_EQ(t_url->url(), modern_default->url());
default_search_manager()->ClearUserSelectedDefaultSearchEngine();
@@ -215,7 +215,7 @@ TEST_F(DefaultSearchPrefMigrationTest, ModernValuePresent) {
default_search_manager()->GetDefaultSearchEngine(&source);
ASSERT_TRUE(modern_default);
EXPECT_EQ(DefaultSearchManager::FROM_USER, source);
- EXPECT_EQ(t_url2->short_name(), modern_default->short_name);
+ EXPECT_EQ(t_url2->short_name(), modern_default->short_name());
EXPECT_EQ(t_url2->keyword(), modern_default->keyword());
EXPECT_EQ(t_url2->url(), modern_default->url());
}

Powered by Google App Engine
This is Rietveld 408576698