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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } // namespace | 113 } // namespace |
114 | 114 |
115 // SearchProviderInstallDataTest ---------------------------------------------- | 115 // SearchProviderInstallDataTest ---------------------------------------------- |
116 | 116 |
117 // Provides basic test set-up/tear-down functionality needed by all tests | 117 // Provides basic test set-up/tear-down functionality needed by all tests |
118 // that use TemplateURLServiceTestUtil. | 118 // that use TemplateURLServiceTestUtil. |
119 class SearchProviderInstallDataTest : public testing::Test { | 119 class SearchProviderInstallDataTest : public testing::Test { |
120 public: | 120 public: |
121 SearchProviderInstallDataTest(); | 121 SearchProviderInstallDataTest(); |
122 | 122 |
123 virtual void SetUp() OVERRIDE; | 123 virtual void SetUp() override; |
124 virtual void TearDown() OVERRIDE; | 124 virtual void TearDown() override; |
125 | 125 |
126 TemplateURL* AddNewTemplateURL(const std::string& url, | 126 TemplateURL* AddNewTemplateURL(const std::string& url, |
127 const base::string16& keyword); | 127 const base::string16& keyword); |
128 | 128 |
129 // Sets the Google base URL to |base_url| and runs the IO thread for | 129 // Sets the Google base URL to |base_url| and runs the IO thread for |
130 // |SearchProviderInstallData| to process the update. | 130 // |SearchProviderInstallData| to process the update. |
131 void SetGoogleBaseURLAndProcessOnIOThread(GURL base_url); | 131 void SetGoogleBaseURLAndProcessOnIOThread(GURL base_url); |
132 | 132 |
133 TemplateURLServiceTestUtil* util() { return &util_; } | 133 TemplateURLServiceTestUtil* util() { return &util_; } |
134 SearchProviderInstallData* install_data() { return install_data_; } | 134 SearchProviderInstallData* install_data() { return install_data_; } |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // Verify the search providers install state (with no default set). | 275 // Verify the search providers install state (with no default set). |
276 test_get_install_state.RunTests(google_host, std::string()); | 276 test_get_install_state.RunTests(google_host, std::string()); |
277 | 277 |
278 // Change the Google base url. | 278 // Change the Google base url. |
279 google_host = "foo.com"; | 279 google_host = "foo.com"; |
280 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/")); | 280 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/")); |
281 | 281 |
282 // Verify that the change got picked up. | 282 // Verify that the change got picked up. |
283 test_get_install_state.RunTests(google_host, std::string()); | 283 test_get_install_state.RunTests(google_host, std::string()); |
284 } | 284 } |
OLD | NEW |