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

Unified Diff: chrome/browser/autocomplete/autocomplete_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
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 d6ccc09a8bfa7dd79a170937f376a5ec41eb753c..229924a46ead4ec79cb8d67f9aba136ca740ef37 100644
--- a/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_provider_unittest.cc
@@ -57,7 +57,9 @@ class TestProvider : public AutocompleteProvider {
match_keyword_(match_keyword) {
}
- void Start(const AutocompleteInput& input, bool minimal_changes) override;
+ void Start(const AutocompleteInput& input,
+ bool minimal_changes,
+ bool called_due_to_focus) override;
void set_listener(AutocompleteProviderListener* listener) {
listener_ = listener;
@@ -83,12 +85,16 @@ class TestProvider : public AutocompleteProvider {
};
void TestProvider::Start(const AutocompleteInput& input,
- bool minimal_changes) {
+ bool minimal_changes,
+ bool called_due_to_focus) {
if (minimal_changes)
return;
matches_.clear();
+ if (called_due_to_focus)
+ return;
+
// Generate 4 results synchronously, the rest later.
AddResults(0, 1);
AddResultsWithSearchTermsArgs(
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_controller.cc ('k') | chrome/browser/autocomplete/bookmark_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698