| Index: chrome/browser/google/google_util_unittest.cc
|
| diff --git a/chrome/browser/google/google_util_unittest.cc b/chrome/browser/google/google_util_unittest.cc
|
| index 5c0bfbbb5cb68cf1eceb6d00cbd8e5d7bababddd..aab1c6e4862743530c51066188add0ac9de6f258 100644
|
| --- a/chrome/browser/google/google_util_unittest.cc
|
| +++ b/chrome/browser/google/google_util_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| using google_util::IsGoogleDomainUrl;
|
| using google_util::IsGoogleHomePageUrl;
|
| using google_util::IsGoogleSearchUrl;
|
| +using google_util::IsInstantExtendedAPIGoogleSearchUrl;
|
|
|
| TEST(GoogleUtilTest, GoodHomePagesNonSecure) {
|
| // Valid home page hosts.
|
| @@ -243,6 +244,35 @@ TEST(GoogleUtilTest, BadSearches) {
|
| "http://www.google.com/WEBHP#q=something"));
|
| }
|
|
|
| +TEST(GoogleUtilTest, IsInstantExtendedAPIGoogleSearchUrl) {
|
| + EXPECT_TRUE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv=1"));
|
| + EXPECT_TRUE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv=3"));
|
| + EXPECT_TRUE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv=42"));
|
| +
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv="));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv=0"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espv=00"));
|
| +
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.foo.com/search?q=something&espv=0"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.foo.com/search?q=something&espv=1"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/bing?q=something&espv=1"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&vespv=1"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search?q=something&espvx=1"));
|
| + EXPECT_FALSE(IsInstantExtendedAPIGoogleSearchUrl(
|
| + "http://www.google.com/search#q=something&espv=1"));
|
| +}
|
| +
|
| TEST(GoogleUtilTest, GoogleDomains) {
|
| // Test some good Google domains (valid TLDs).
|
| EXPECT_TRUE(IsGoogleDomainUrl("http://www.google.com",
|
|
|