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

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

Issue 12090006: Omnibox: Create Keyword Verbatim Result in Search Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: roperly resolved (variable rename) Created 7 years, 10 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 | chrome/browser/autocomplete/keyword_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
index 87d5f89715738e02b33546b08a5e32f48fc97af0..cda219d0f2b4c3d1228e01fe1aaa78dffd0e0cdf 100644
--- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
@@ -397,15 +397,20 @@ void AutocompleteProviderTest::RunExactKeymatchTest(
bool allow_exact_keyword_match) {
// Send the controller input which exactly matches the keyword provider we
// created in ResetControllerWithKeywordAndSearchProviders(). The default
- // match should thus be a keyword match iff |allow_exact_keyword_match| is
- // true.
+ // match should thus be a search-other-engine match iff
+ // |allow_exact_keyword_match| is true. Regardless, the match should
+ // be from SearchProvider. (It provides all verbatim search matches,
+ // keyword or not.)
controller_->Start(AutocompleteInput(
ASCIIToUTF16("k test"), string16::npos, string16(), true, false,
allow_exact_keyword_match, AutocompleteInput::SYNCHRONOUS_MATCHES));
EXPECT_TRUE(controller_->done());
- EXPECT_EQ(allow_exact_keyword_match ?
- AutocompleteProvider::TYPE_KEYWORD : AutocompleteProvider::TYPE_SEARCH,
+ EXPECT_EQ(AutocompleteProvider::TYPE_SEARCH,
controller_->result().default_match()->provider->type());
+ EXPECT_EQ(allow_exact_keyword_match ?
+ AutocompleteMatch::SEARCH_OTHER_ENGINE :
+ AutocompleteMatch::SEARCH_WHAT_YOU_TYPED,
+ controller_->result().default_match()->type);
}
void AutocompleteProviderTest::Observe(
« no previous file with comments | « no previous file | chrome/browser/autocomplete/keyword_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698