Index: chrome/browser/autocomplete/search_provider_unittest.cc |
diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc |
index 9ad44061df53a1e1faef42c6fd647b1fd269e383..563a7a573962b7e352fca95bc2cf377a2ca7ca9c 100644 |
--- a/chrome/browser/autocomplete/search_provider_unittest.cc |
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc |
@@ -200,8 +200,8 @@ void SearchProviderTest::QueryForInputAndSetWYTMatch( |
return; |
ASSERT_GE(provider_->matches().size(), 1u); |
EXPECT_TRUE(FindMatchWithDestination(GURL( |
- default_t_url_->url()->ReplaceSearchTerms(*default_t_url_, text, 0, |
- string16())), wyt_match)); |
+ default_t_url_->url()->ReplaceSearchTerms( |
+ &profile_, *default_t_url_, text, 0, string16())), wyt_match)); |
Peter Kasting
2011/08/11 00:35:17
Seems like this file should generally pass NULL as
|
} |
void SearchProviderTest::TearDown() { |
@@ -216,7 +216,8 @@ GURL SearchProviderTest::AddSearchToHistory(TemplateURL* t_url, |
int visit_count) { |
HistoryService* history = |
profile_.GetHistoryService(Profile::EXPLICIT_ACCESS); |
- GURL search(t_url->url()->ReplaceSearchTerms(*t_url, term, 0, string16())); |
+ GURL search(t_url->url()->ReplaceSearchTerms(&profile_, *t_url, term, 0, |
+ string16())); |
static base::Time last_added_time; |
last_added_time = std::max(base::Time::Now(), |
last_added_time + base::TimeDelta::FromMicroseconds(1)); |
@@ -264,7 +265,7 @@ TEST_F(SearchProviderTest, QueryDefaultProvider) { |
// And the URL matches what we expected. |
GURL expected_url = GURL(default_t_url_->suggestions_url()-> |
- ReplaceSearchTerms(*default_t_url_, term, 0, string16())); |
+ ReplaceSearchTerms(&profile_, *default_t_url_, term, 0, string16())); |
ASSERT_TRUE(fetcher->original_url() == expected_url); |
// Tell the SearchProvider the suggest query is done. |
@@ -285,8 +286,8 @@ TEST_F(SearchProviderTest, QueryDefaultProvider) { |
AutocompleteMatch wyt_match; |
EXPECT_TRUE(FindMatchWithDestination(GURL( |
- default_t_url_->url()->ReplaceSearchTerms(*default_t_url_, term, 0, |
- string16())), &wyt_match)); |
+ default_t_url_->url()->ReplaceSearchTerms( |
+ &profile_, *default_t_url_, term, 0, string16())), &wyt_match)); |
EXPECT_TRUE(wyt_match.description.empty()); |
// The match for term1 should be more relevant than the what you typed result. |
@@ -326,7 +327,7 @@ TEST_F(SearchProviderTest, QueryKeywordProvider) { |
// And the URL matches what we expected. |
GURL expected_url = GURL(keyword_t_url_->suggestions_url()-> |
- ReplaceSearchTerms(*keyword_t_url_, term, 0, string16())); |
+ ReplaceSearchTerms(&profile_, *keyword_t_url_, term, 0, string16())); |
ASSERT_TRUE(keyword_fetcher->original_url() == expected_url); |
// Tell the SearchProvider the keyword suggest query is done. |
@@ -396,7 +397,7 @@ TEST_F(SearchProviderTest, FinalizeInstantQuery) { |
// 'foobar'. |
EXPECT_EQ(2u, provider_->matches().size()); |
GURL instant_url = GURL(default_t_url_->url()->ReplaceSearchTerms( |
- *default_t_url_, ASCIIToUTF16("foobar"), 0, string16())); |
+ &profile_, *default_t_url_, ASCIIToUTF16("foobar"), 0, string16())); |
AutocompleteMatch instant_match; |
EXPECT_TRUE(FindMatchWithDestination(instant_url, &instant_match)); |
@@ -406,7 +407,7 @@ TEST_F(SearchProviderTest, FinalizeInstantQuery) { |
// Make sure the what you typed match has no description. |
AutocompleteMatch wyt_match; |
EXPECT_TRUE(FindMatchWithDestination(GURL( |
- default_t_url_->url()->ReplaceSearchTerms(*default_t_url_, |
+ default_t_url_->url()->ReplaceSearchTerms(&profile_, *default_t_url_, |
ASCIIToUTF16("foo"), 0, string16())), &wyt_match)); |
EXPECT_TRUE(wyt_match.description.empty()); |
@@ -428,8 +429,8 @@ TEST_F(SearchProviderTest, RememberInstantQuery) { |
// There should be two matches, one for what you typed, the other for |
// 'foobar'. |
EXPECT_EQ(2u, provider_->matches().size()); |
- GURL instant_url(default_t_url_->url()->ReplaceSearchTerms(*default_t_url_, |
- ASCIIToUTF16("foobar"), 0, string16())); |
+ GURL instant_url(default_t_url_->url()->ReplaceSearchTerms(&profile_, |
+ *default_t_url_, ASCIIToUTF16("foobar"), 0, string16())); |
AutocompleteMatch instant_match; |
EXPECT_TRUE(FindMatchWithDestination(instant_url, &instant_match)); |