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

Unified Diff: components/omnibox/autocomplete_result_unittest.cc

Issue 1098843004: Omnibox - Do Not Allow HTTP/HTTPS Equivalence if User Explicitly Entered A Scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix browsertests compile error (sigh) Created 5 years, 6 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 | « components/omnibox/autocomplete_result.cc ('k') | components/omnibox/history_quick_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, &current_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());
« no previous file with comments | « components/omnibox/autocomplete_result.cc ('k') | components/omnibox/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698