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

Unified Diff: components/omnibox/keyword_provider_unittest.cc

Issue 836213002: Assume all providers may give zero suggest responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation issue in athena Created 5 years, 11 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/keyword_provider.cc ('k') | components/omnibox/search_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/keyword_provider_unittest.cc
diff --git a/components/omnibox/keyword_provider_unittest.cc b/components/omnibox/keyword_provider_unittest.cc
index c03fcff0460047893d112666676e81f255730715..eedc8475f83c5a3dbc274eb006aa51dd28d70d55 100644
--- a/components/omnibox/keyword_provider_unittest.cc
+++ b/components/omnibox/keyword_provider_unittest.cc
@@ -97,7 +97,7 @@ void KeywordProviderTest::RunTest(TestData<ResultType>* keyword_cases,
std::string(), GURL(),
metrics::OmniboxEventProto::INVALID_SPEC, true,
false, true, true, TestingSchemeClassifier());
- kw_provider_->Start(input, false);
+ kw_provider_->Start(input, false, false);
EXPECT_TRUE(kw_provider_->done());
matches = kw_provider_->matches();
ASSERT_EQ(keyword_cases[i].num_results, matches.size());
@@ -367,3 +367,12 @@ TEST_F(KeywordProviderTest, ExtraQueryParams) {
RunTest<GURL>(url_cases, arraysize(url_cases),
&AutocompleteMatch::destination_url);
}
+
+TEST_F(KeywordProviderTest, DoesNotProvideMatchesOnFocus) {
+ AutocompleteInput input(ASCIIToUTF16("aaa"), base::string16::npos,
+ std::string(), GURL(),
+ metrics::OmniboxEventProto::INVALID_SPEC, true,
+ false, true, true, TestingSchemeClassifier());
+ kw_provider_->Start(input, false, true);
+ ASSERT_TRUE(kw_provider_->matches().empty());
+}
« no previous file with comments | « components/omnibox/keyword_provider.cc ('k') | components/omnibox/search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698