OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
7 #include "chrome/browser/google/google_url_tracker.h" | 7 #include "chrome/browser/google/google_url_tracker.h" |
8 #include "chrome/browser/google/google_util.h" | 8 #include "chrome/browser/google/google_util.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 using google_util::IsGoogleDomainUrl; | 12 using google_util::IsGoogleDomainUrl; |
13 using google_util::IsGoogleHomePageUrl; | 13 using google_util::IsGoogleHomePageUrl; |
14 using google_util::IsGoogleSearchUrl; | 14 using google_util::IsGoogleSearchUrl; |
15 | 15 |
16 TEST(GoogleUtilTest, GoodHomePagesNonSecure) { | 16 TEST(GoogleUtilTest, GoodHomePagesNonSecure) { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 EXPECT_TRUE(IsGoogleDomainUrl("http://test.foo.com:1234", | 339 EXPECT_TRUE(IsGoogleDomainUrl("http://test.foo.com:1234", |
340 google_util::DISALLOW_SUBDOMAIN, | 340 google_util::DISALLOW_SUBDOMAIN, |
341 google_util::DISALLOW_NON_STANDARD_PORTS)); | 341 google_util::DISALLOW_NON_STANDARD_PORTS)); |
342 EXPECT_FALSE(IsGoogleDomainUrl("file://test.foo.com:1234", | 342 EXPECT_FALSE(IsGoogleDomainUrl("file://test.foo.com:1234", |
343 google_util::DISALLOW_SUBDOMAIN, | 343 google_util::DISALLOW_SUBDOMAIN, |
344 google_util::DISALLOW_NON_STANDARD_PORTS)); | 344 google_util::DISALLOW_NON_STANDARD_PORTS)); |
345 EXPECT_TRUE(IsGoogleDomainUrl("http://www.google.com", | 345 EXPECT_TRUE(IsGoogleDomainUrl("http://www.google.com", |
346 google_util::DISALLOW_SUBDOMAIN, | 346 google_util::DISALLOW_SUBDOMAIN, |
347 google_util::DISALLOW_NON_STANDARD_PORTS)); | 347 google_util::DISALLOW_NON_STANDARD_PORTS)); |
348 } | 348 } |
OLD | NEW |