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

Unified Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 2045873002: Omnibox: Don't Barf When Suggestion is Mixed-Case Equivalent to Verbatim (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "" -> std::string() Created 4 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 | « no previous file | components/omnibox/browser/base_search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7a7ef4c6ad016689621c46731c46f8c01933f5fe..f95a0c43a3ceddab41e35b4bf11e1da1c968383a 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -2209,6 +2209,21 @@ TEST_F(SearchProviderTest, DontInlineAutocompleteAsynchronously) {
{ { "ab", true }, { "ab1", true }, { "ab2", false },
kEmptyExpectedMatch } },
+ // If a suggestion is equivalent to the verbatim suggestion, it should be
+ // collapsed into one. Furthermore, it should be allowed to be the default
+ // match even if it was not previously displayed inlined. This test is
+ // mainly for checking the first_async_matches.
+ { "[\"a\",[\"A\"],[],[],"
+ "{\"google:verbatimrelevance\":9000, "
+ "\"google:suggestrelevance\":[9001]}]",
+ { { "A", true }, kEmptyExpectedMatch, kEmptyExpectedMatch,
+ kEmptyExpectedMatch },
+ { { "ab", true }, { "A", false }, kEmptyExpectedMatch,
+ kEmptyExpectedMatch },
+ std::string(),
+ { { "ab", true }, { "A", false }, kEmptyExpectedMatch,
+ kEmptyExpectedMatch } },
+
// Note: it's possible that the suggest server returns a suggestion with
// an inline autocompletion (that as usual we delay in allowing it to
// be displayed as an inline autocompletion until the next keystroke),
« no previous file with comments | « no previous file | components/omnibox/browser/base_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698