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

Unified Diff: chrome/browser/search_engines/template_url_unittest.cc

Issue 11884037: InstantExtended: Bail on TemplateURLs with no espv. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Braces. Created 7 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/search_engines/template_url_unittest.cc
diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc
index d7c54f1c963f5d5dc61f815d5efbd989a01348a0..35db736a3ef0dea0bc925feb38014d48838b7e75 100644
--- a/chrome/browser/search_engines/template_url_unittest.cc
+++ b/chrome/browser/search_engines/template_url_unittest.cc
@@ -924,3 +924,20 @@ TEST_F(TemplateURLTest, HasSearchTermsReplacementKey) {
EXPECT_TRUE(url.HasSearchTermsReplacementKey(
GURL("http://bing.com/#espv")));
}
+
+TEST_F(TemplateURLTest, SupportsInstantExtendedParam) {
+ TemplateURLData data;
+ data.SetURL("http://google.com/?q={searchTerms}");
+ data.instant_url = "http://google.com/instant#q={searchTerms}"
+ "{google:instantExtendedEnabledParameter}";
+ TemplateURL url(NULL, data);
+
+ EXPECT_TRUE(url.SupportsInstantExtendedParam());
+
+ TemplateURLData data2;
+ data2.SetURL("http://google.com/?q={searchTerms}");
+ data2.instant_url = "http://google.com/instant#q={searchTerms}";
+ TemplateURL url2(NULL, data2);
+
+ EXPECT_FALSE(url2.SupportsInstantExtendedParam());
+}

Powered by Google App Engine
This is Rietveld 408576698