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

Unified Diff: components/omnibox/browser/keyword_provider_unittest.cc

Issue 1784233003: Omnibox - Keyword Provider Shouldn't Bold What-You-Typed Queries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 9 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
Index: components/omnibox/browser/keyword_provider_unittest.cc
diff --git a/components/omnibox/browser/keyword_provider_unittest.cc b/components/omnibox/browser/keyword_provider_unittest.cc
index c0476a5b30a18b08941db5e5d6e6a58765c282d0..cd483df78d0b20bc4ba4fc3a1dda6f7ebd1bb1bb 100644
--- a/components/omnibox/browser/keyword_provider_unittest.cc
+++ b/components/omnibox/browser/keyword_provider_unittest.cc
@@ -400,16 +400,21 @@ TEST_F(KeywordProviderTest, Contents) {
{ { ASCIIToUTF16("Search aaaa for <enter query>"), false },
{ ASCIIToUTF16("Search aaaaa for <enter query>"), false },
kEmptyMatch} },
+ // When there is a search string, simply display it, not Search ... for ...
+ // These suggestions will be disambiguated by the description "www Search",
+ // "weasel Search", etc. We do not test the description value here
+ // because KeywordProvider doesn't set descriptions; these are populated
+ // later by AutocompleteController.
{ ASCIIToUTF16("www.w w"), 2,
- { { ASCIIToUTF16("Search www for w"), false },
- { ASCIIToUTF16("Search weasel for w"), false },
+ { { ASCIIToUTF16("w"), false },
+ { ASCIIToUTF16("w"), false },
kEmptyMatch } },
// Also, check that tokenization only collapses whitespace between first
// tokens and contents are not escaped or unescaped.
{ ASCIIToUTF16("a 1 2+ 3"), 3,
- { { ASCIIToUTF16("Search aa for 1 2+ 3"), false },
- { ASCIIToUTF16("Search ab for 1 2+ 3"), false },
- { ASCIIToUTF16("Search aaaa for 1 2+ 3"), false } } },
+ { { ASCIIToUTF16("1 2+ 3"), false },
+ { ASCIIToUTF16("1 2+ 3"), false },
+ { ASCIIToUTF16("1 2+ 3"), false } } },
};
SetUpClientAndKeywordProvider();

Powered by Google App Engine
This is Rietveld 408576698