| 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 3524fb3680c583ba8105fe1afb36917eac6702e7..1cb585ee4d408e7a3be476f300591a021e314cd0 100644
|
| --- a/chrome/browser/autocomplete/search_provider_unittest.cc
|
| +++ b/chrome/browser/autocomplete/search_provider_unittest.cc
|
| @@ -207,8 +207,8 @@ void SearchProviderTest::QueryForInputAndSetWYTMatch(
|
| return;
|
| ASSERT_GE(provider_->matches().size(), 1u);
|
| EXPECT_TRUE(FindMatchWithDestination(GURL(
|
| - default_t_url_->url_ref().ReplaceSearchTerms(text,
|
| - TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())), wyt_match));
|
| + default_t_url_->url_ref().ReplaceSearchTerms(SearchTermsArgs(text))),
|
| + wyt_match));
|
| }
|
|
|
| void SearchProviderTest::TearDown() {
|
| @@ -223,8 +223,7 @@ GURL SearchProviderTest::AddSearchToHistory(TemplateURL* t_url,
|
| int visit_count) {
|
| HistoryService* history =
|
| profile_.GetHistoryService(Profile::EXPLICIT_ACCESS);
|
| - GURL search(t_url->url_ref().ReplaceSearchTerms(term,
|
| - TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
|
| + GURL search(t_url->url_ref().ReplaceSearchTerms(SearchTermsArgs(term)));
|
| static base::Time last_added_time;
|
| last_added_time = std::max(base::Time::Now(),
|
| last_added_time + base::TimeDelta::FromMicroseconds(1));
|
| @@ -283,7 +282,7 @@ TEST_F(SearchProviderTest, QueryDefaultProvider) {
|
|
|
| // And the URL matches what we expected.
|
| GURL expected_url(default_t_url_->suggestions_url_ref().ReplaceSearchTerms(
|
| - term, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
|
| + SearchTermsArgs(term)));
|
| ASSERT_TRUE(fetcher->GetOriginalURL() == expected_url);
|
|
|
| // Tell the SearchProvider the suggest query is done.
|
| @@ -303,8 +302,8 @@ TEST_F(SearchProviderTest, QueryDefaultProvider) {
|
|
|
| AutocompleteMatch wyt_match;
|
| EXPECT_TRUE(FindMatchWithDestination(
|
| - GURL(default_t_url_->url_ref().ReplaceSearchTerms(term,
|
| - TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())), &wyt_match));
|
| + GURL(default_t_url_->url_ref().ReplaceSearchTerms(
|
| + SearchTermsArgs(term))), &wyt_match));
|
| EXPECT_TRUE(wyt_match.description.empty());
|
|
|
| // The match for term1 should be more relevant than the what you typed result.
|
| @@ -343,7 +342,7 @@ TEST_F(SearchProviderTest, QueryKeywordProvider) {
|
|
|
| // And the URL matches what we expected.
|
| GURL expected_url(keyword_t_url_->suggestions_url_ref().ReplaceSearchTerms(
|
| - term, TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16()));
|
| + SearchTermsArgs(term)));
|
| ASSERT_TRUE(keyword_fetcher->GetOriginalURL() == expected_url);
|
|
|
| // Tell the SearchProvider the keyword suggest query is done.
|
| @@ -412,8 +411,7 @@ TEST_F(SearchProviderTest, FinalizeInstantQuery) {
|
| // 'foobar'.
|
| EXPECT_EQ(2u, provider_->matches().size());
|
| GURL instant_url(default_t_url_->url_ref().ReplaceSearchTerms(
|
| - ASCIIToUTF16("foobar"), TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
|
| - string16()));
|
| + SearchTermsArgs(ASCIIToUTF16("foobar"))));
|
| AutocompleteMatch instant_match;
|
| EXPECT_TRUE(FindMatchWithDestination(instant_url, &instant_match));
|
|
|
| @@ -423,8 +421,8 @@ 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_ref().ReplaceSearchTerms(ASCIIToUTF16("foo"),
|
| - TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, string16())), &wyt_match));
|
| + GURL(default_t_url_->url_ref().ReplaceSearchTerms(
|
| + SearchTermsArgs(ASCIIToUTF16("foo")))), &wyt_match));
|
| EXPECT_TRUE(wyt_match.description.empty());
|
|
|
| // The instant search should be more relevant.
|
| @@ -446,8 +444,7 @@ TEST_F(SearchProviderTest, RememberInstantQuery) {
|
| // 'foobar'.
|
| EXPECT_EQ(2u, provider_->matches().size());
|
| GURL instant_url(default_t_url_->url_ref().ReplaceSearchTerms(
|
| - ASCIIToUTF16("foobar"), TemplateURLRef::NO_SUGGESTIONS_AVAILABLE,
|
| - string16()));
|
| + SearchTermsArgs(ASCIIToUTF16("foobar"))));
|
| AutocompleteMatch instant_match;
|
| EXPECT_TRUE(FindMatchWithDestination(instant_url, &instant_match));
|
|
|
|
|