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

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

Issue 1134123004: Omnibox - Use Case Insensitive Matching when Bolding Query Suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wchar->char16 Created 5 years, 7 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/search_suggestion_parser.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 9723cafa2ce25f580c693f9987b824a3c126f823..167f32e0ab3a58354ec8e7c6e4a7a28407b60146 100644
--- a/chrome/browser/autocomplete/search_provider_unittest.cc
+++ b/chrome/browser/autocomplete/search_provider_unittest.cc
@@ -1110,6 +1110,16 @@ TEST_F(SearchProviderTest, InlineMixedCaseMatches) {
EXPECT_EQ(ASCIIToUTF16("FOO"), term_match.fill_into_edit);
EXPECT_EQ(ASCIIToUTF16("OO"), term_match.inline_autocompletion);
EXPECT_TRUE(term_match.allowed_to_be_default_match);
+ // Make sure the case doesn't affect the highlighting.
+ // (SearchProvider intentionally marks the new text as MATCH; that's why
+ // the tests below look backwards.)
+ ASSERT_EQ(2U, term_match.contents_class.size());
+ EXPECT_EQ(0U, term_match.contents_class[0].offset);
+ EXPECT_EQ(AutocompleteMatch::ACMatchClassification::NONE,
+ term_match.contents_class[0].style);
+ EXPECT_EQ(1U, term_match.contents_class[1].offset);
+ EXPECT_EQ(AutocompleteMatch::ACMatchClassification::MATCH,
+ term_match.contents_class[1].style);
}
// Verifies AutocompleteControllers return results (including keyword
« no previous file with comments | « no previous file | components/omnibox/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698