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

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: fix interactive test Created 6 years, 4 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/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 a3f8867c160b78d186a5eebca220ea2585f25a72..59761a697fa3bb54c0e3a5bba4b24ef0c6bcf172 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 new inline autocomplete suggestion to become the
msw 2014/08/27 18:44:39 nit: "to allow the new inline autocomplete suggest
Mark P 2014/08/27 23:08:20 Done.
+ // inline autocomplete suggestion (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 =

Powered by Google App Engine
This is Rietveld 408576698