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

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

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thread safe handling of Profiles Created 9 years, 4 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/template_url_prepopulate_data_unittest.cc
diff --git a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
index 0348259304be1f4ce4962cb97c5c8f894f57683c..4593afcebd387b84fe676d99b62db9d288bd81d2 100644
--- a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
+++ b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
@@ -132,11 +132,11 @@ TEST_F(TemplateURLPrepopulateDataTest, ProvidersFromPrefs) {
}
TEST_F(TemplateURLPrepopulateDataTest, SearchEngineFromOrigin) {
- UIThreadSearchTermsData search_terms_data;
std::set<GURL> unique_engines;
{ // Scoping for the profile.
TestingProfile profile;
+ UIThreadSearchTermsData search_terms_data(&profile);
Peter Kasting 2011/08/10 20:54:06 You can pass NULL here and below.
for (size_t i = 0; i < arraysize(kCountryIds); ++i) {
profile.GetPrefs()->SetInteger(prefs::kCountryIDAtInstall,
kCountryIds[i]);
@@ -157,11 +157,11 @@ TEST_F(TemplateURLPrepopulateDataTest, SearchEngineFromOrigin) {
}
TestingProfile profile;
+ UIThreadSearchTermsData search_terms_data(&profile);
for (std::set<GURL>::iterator it = unique_engines.begin();
it != unique_engines.end(); ++it) {
scoped_ptr<TemplateURL> found_url(
- TemplateURLPrepopulateData::GetEngineForOrigin(profile.GetPrefs(),
- *it));
+ TemplateURLPrepopulateData::GetEngineForOrigin(&profile, *it));
EXPECT_EQ(
TemplateURLService::GenerateSearchURLUsingTermsData(
found_url.get(), search_terms_data).GetOrigin(),
@@ -169,8 +169,7 @@ TEST_F(TemplateURLPrepopulateDataTest, SearchEngineFromOrigin) {
}
GURL not_a_search_engine("http://example.com/");
- EXPECT_EQ(NULL, TemplateURLPrepopulateData::GetEngineForOrigin(
- profile.GetPrefs(),
+ EXPECT_EQ(NULL, TemplateURLPrepopulateData::GetEngineForOrigin(&profile,
not_a_search_engine));
}

Powered by Google App Engine
This is Rietveld 408576698