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

Unified Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.cc

Issue 481693004: Omnibox: Prevent Asynchronous Suggestions from Changing Default Match (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 3 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 | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | components/omnibox/base_search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_extended_interactive_uitest.cc
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index c15650453984d3d0ac10f6bd268e5d637ca88a84..7b9b9131fa63b3e2cdfddb2bf6a517bd5d13200a 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -834,17 +834,19 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedPrefetchTest, SetPrefetchQuery) {
observer.Wait();
// Set the fake response for suggest request. Response has prefetch details.
- // Ensure that the page received the prefetch query.
+ // Ensure that the page received the suggest response, then add another
+ // keystroke to allow the asynchronously-received inline autocomplete
+ // suggestion to actually be inlined (which in turn triggers it to prefetch).
fake_factory()->SetFakeResponse(
- instant_url().Resolve("#q=pupp"),
- "[\"pupp\",[\"puppy\", \"puppies\"],[],[],"
+ instant_url().Resolve("#q=pup"),
+ "[\"pup\",[\"puppy\", \"puppies\"],[],[],"
"{\"google:clientdata\":{\"phi\": 0},"
"\"google:suggesttype\":[\"QUERY\", \"QUERY\"],"
"\"google:suggestrelevance\":[1400, 9]}]",
net::HTTP_OK,
net::URLRequestStatus::SUCCESS);
- SetOmniboxText("pupp");
+ SetOmniboxText("pup");
while (!omnibox()->model()->autocomplete_controller()->done()) {
content::WindowedNotificationObserver ready_observer(
chrome::NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY,
@@ -852,6 +854,7 @@ IN_PROC_BROWSER_TEST_F(InstantExtendedPrefetchTest, SetPrefetchQuery) {
omnibox()->model()->autocomplete_controller()));
ready_observer.Wait();
}
+ SetOmniboxText("pupp");
ASSERT_EQ(3, CountSearchProviderSuggestions());
content::WebContents* active_tab =
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | components/omnibox/base_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698