| Index: components/omnibox/autocomplete_result_unittest.cc
|
| diff --git a/components/omnibox/autocomplete_result_unittest.cc b/components/omnibox/autocomplete_result_unittest.cc
|
| index 1da1a5aa867f08e43d580e069fb02ac13e3bd745..230a4bfd9e7dd7dcd01ac7f927ba5609d6bfadae 100644
|
| --- a/components/omnibox/autocomplete_result_unittest.cc
|
| +++ b/components/omnibox/autocomplete_result_unittest.cc
|
| @@ -205,15 +205,15 @@ void AutocompleteResultTest::RunCopyOldMatchesTest(
|
| PopulateAutocompleteMatches(last, last_size, &last_matches);
|
| AutocompleteResult last_result;
|
| last_result.AppendMatches(input, last_matches);
|
| - last_result.SortAndCull(input, template_url_service_.get());
|
| + last_result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| ACMatches current_matches;
|
| PopulateAutocompleteMatches(current, current_size, ¤t_matches);
|
| AutocompleteResult current_result;
|
| current_result.AppendMatches(input, current_matches);
|
| - current_result.SortAndCull(input, template_url_service_.get());
|
| + current_result.SortAndCull(input, std::string(), template_url_service_.get());
|
| current_result.CopyOldMatches(
|
| - input, last_result, template_url_service_.get());
|
| + input, std::string(), last_result, template_url_service_.get());
|
|
|
| AssertResultMatches(current_result, expected, expected_size);
|
| }
|
| @@ -239,7 +239,7 @@ TEST_F(AutocompleteResultTest, Swap) {
|
| true, false, TestSchemeClassifier());
|
| matches.push_back(match);
|
| r1.AppendMatches(input, matches);
|
| - r1.SortAndCull(input, template_url_service_.get());
|
| + r1.SortAndCull(input, std::string(), template_url_service_.get());
|
| EXPECT_EQ(r1.begin(), r1.default_match());
|
| EXPECT_EQ("http://a/", r1.alternate_nav_url().spec());
|
| r1.Swap(&r2);
|
| @@ -376,7 +376,7 @@ TEST_F(AutocompleteResultTest, SortAndCullEmptyDestinationURLs) {
|
| false, true, false, TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| // Of the two results with the same non-empty destination URL, the
|
| // lower-relevance one should be dropped. All of the results with empty URLs
|
| @@ -421,7 +421,7 @@ TEST_F(AutocompleteResultTest, SortAndCullDuplicateSearchURLs) {
|
| false, true, false, TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| // We expect the 3rd and 4th results to be removed.
|
| ASSERT_EQ(3U, result.size());
|
| @@ -472,7 +472,7 @@ TEST_F(AutocompleteResultTest, SortAndCullWithMatchDups) {
|
| false, true, false, TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| // Expect 3 unique results after SortAndCull().
|
| ASSERT_EQ(3U, result.size());
|
| @@ -525,7 +525,7 @@ TEST_F(AutocompleteResultTest, SortAndCullWithDemotionsByType) {
|
| false, true, false, TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| // Check the new ordering. The history-title results should be omitted.
|
| // We cannot check relevance scores because the matches are sorted by
|
| @@ -570,7 +570,7 @@ TEST_F(AutocompleteResultTest, SortAndCullWithMatchDupsAndDemotionsByType) {
|
| false, false, true, false, TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
|
|
| // The NAVSUGGEST dup-url stay above search-url since the navsuggest
|
| // variant should not be demoted.
|
| @@ -608,7 +608,7 @@ TEST_F(AutocompleteResultTest, SortAndCullReorderForDefaultMatch) {
|
| TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
| AssertResultMatches(result, data, 4);
|
| }
|
|
|
| @@ -624,7 +624,7 @@ TEST_F(AutocompleteResultTest, SortAndCullReorderForDefaultMatch) {
|
| TestSchemeClassifier());
|
| AutocompleteResult result;
|
| result.AppendMatches(input, matches);
|
| - result.SortAndCull(input, template_url_service_.get());
|
| + result.SortAndCull(input, std::string(), template_url_service_.get());
|
| ASSERT_EQ(4U, result.size());
|
| EXPECT_EQ("http://c/", result.match_at(0)->destination_url.spec());
|
| EXPECT_EQ("http://a/", result.match_at(1)->destination_url.spec());
|
|
|