| 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 "chrome/browser/google/google_url_tracker.h" | |
| 7 #include "chrome/browser/google/google_util.h" | 6 #include "chrome/browser/google/google_util.h" |
| 8 #include "components/google/core/browser/google_switches.h" | 7 #include "components/google/core/browser/google_switches.h" |
| 8 #include "components/google/core/browser/google_url_tracker.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 using google_util::IsGoogleDomainUrl; | 11 using google_util::IsGoogleDomainUrl; |
| 12 | 12 |
| 13 | 13 |
| 14 // Helpers -------------------------------------------------------------------- | 14 // Helpers -------------------------------------------------------------------- |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // These functions merely provide brevity in the callers. | 18 // These functions merely provide brevity in the callers. |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 EXPECT_FALSE(google_util::CommandLineGoogleBaseURL().is_valid()); | 347 EXPECT_FALSE(google_util::CommandLineGoogleBaseURL().is_valid()); |
| 348 } | 348 } |
| 349 | 349 |
| 350 TEST(GoogleUtilTest, GoogleBaseURLFixup) { | 350 TEST(GoogleUtilTest, GoogleBaseURLFixup) { |
| 351 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kGoogleBaseURL, | 351 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kGoogleBaseURL, |
| 352 "www.foo.com"); | 352 "www.foo.com"); |
| 353 ASSERT_TRUE(google_util::CommandLineGoogleBaseURL().is_valid()); | 353 ASSERT_TRUE(google_util::CommandLineGoogleBaseURL().is_valid()); |
| 354 EXPECT_EQ("http://www.foo.com/", | 354 EXPECT_EQ("http://www.foo.com/", |
| 355 google_util::CommandLineGoogleBaseURL().spec()); | 355 google_util::CommandLineGoogleBaseURL().spec()); |
| 356 } | 356 } |
| OLD | NEW |