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

Unified Diff: chrome/browser/autocomplete/keyword_provider_unittest.cc

Issue 9982018: Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider_unittest.cc (revision 130759)
+++ chrome/browser/autocomplete/keyword_provider_unittest.cc (working copy)
@@ -201,12 +201,12 @@
}
TEST_F(KeywordProviderTest, AddKeyword) {
- TemplateURL* template_url = new TemplateURL();
+ TemplateURLData data;
+ data.short_name = ASCIIToUTF16("Test");
string16 keyword(ASCIIToUTF16("foo"));
- std::string url("http://www.google.com/foo?q={searchTerms}");
- template_url->SetURL(url);
- template_url->set_keyword(keyword);
- template_url->set_short_name(ASCIIToUTF16("Test"));
+ data.SetKeyword(keyword);
+ data.SetURL("http://www.google.com/foo?q={searchTerms}");
+ TemplateURL* template_url = new TemplateURL(data);
model_->Add(template_url);
ASSERT_TRUE(template_url == model_->GetTemplateURLForKeyword(keyword));
}
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698