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

Unified Diff: chrome/browser/instant/instant_test_utils.cc

Issue 12114050: [Instant] Instant Extended tests for search term extraction. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixes 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
Index: chrome/browser/instant/instant_test_utils.cc
diff --git a/chrome/browser/instant/instant_test_utils.cc b/chrome/browser/instant/instant_test_utils.cc
index 56aed0f51122ebd3989a6f494f229b859273ad63..6efa6a406338a8eb78688619fb6720c3fef34e50 100644
--- a/chrome/browser/instant/instant_test_utils.cc
+++ b/chrome/browser/instant/instant_test_utils.cc
@@ -65,8 +65,12 @@ void InstantTestBase::SetupInstantUsingTemplateURL() {
ui_test_utils::WaitForTemplateURLServiceToLoad(service);
TemplateURLData data;
- data.SetURL("http://does/not/exist?q={searchTerms}");
+ // Necessary to use exact URL for both the main URL and the alternate URL for
+ // search term extraction to work in InstantExtended.
+ data.SetURL(instant_url_.spec() + "q={searchTerms}");
data.instant_url = instant_url_.spec();
+ data.alternate_urls.push_back(instant_url_.spec() + "#q={searchTerms}");
+ data.search_terms_replacement_key = "strk";
TemplateURL* template_url = new TemplateURL(browser()->profile(), data);
service->Add(template_url); // Takes ownership of |template_url|.

Powered by Google App Engine
This is Rietveld 408576698