| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // It doesn't matter that this happens after install_data_ is deleted. | 167 // It doesn't matter that this happens after install_data_ is deleted. |
| 168 process_.reset(); | 168 process_.reset(); |
| 169 | 169 |
| 170 testing::Test::TearDown(); | 170 testing::Test::TearDown(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 TemplateURL* SearchProviderInstallDataTest::AddNewTemplateURL( | 173 TemplateURL* SearchProviderInstallDataTest::AddNewTemplateURL( |
| 174 const std::string& url, | 174 const std::string& url, |
| 175 const base::string16& keyword) { | 175 const base::string16& keyword) { |
| 176 TemplateURLData data; | 176 TemplateURLData data; |
| 177 data.short_name = keyword; | 177 data.SetShortName(keyword); |
| 178 data.SetKeyword(keyword); | 178 data.SetKeyword(keyword); |
| 179 data.SetURL(url); | 179 data.SetURL(url); |
| 180 TemplateURL* t_url = new TemplateURL(data); | 180 TemplateURL* t_url = new TemplateURL(data); |
| 181 util_.model()->Add(t_url); | 181 util_.model()->Add(t_url); |
| 182 return t_url; | 182 return t_url; |
| 183 } | 183 } |
| 184 | 184 |
| 185 void SearchProviderInstallDataTest::SetGoogleBaseURLAndProcessOnIOThread( | 185 void SearchProviderInstallDataTest::SetGoogleBaseURLAndProcessOnIOThread( |
| 186 GURL base_url) { | 186 GURL base_url) { |
| 187 util_.SetGoogleBaseURL(base_url); | 187 util_.SetGoogleBaseURL(base_url); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // Verify the search providers install state (with no default set). | 270 // Verify the search providers install state (with no default set). |
| 271 test_get_install_state.RunTests(google_host, std::string()); | 271 test_get_install_state.RunTests(google_host, std::string()); |
| 272 | 272 |
| 273 // Change the Google base url. | 273 // Change the Google base url. |
| 274 google_host = "foo.com"; | 274 google_host = "foo.com"; |
| 275 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/")); | 275 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/")); |
| 276 | 276 |
| 277 // Verify that the change got picked up. | 277 // Verify that the change got picked up. |
| 278 test_get_install_state.RunTests(google_host, std::string()); | 278 test_get_install_state.RunTests(google_host, std::string()); |
| 279 } | 279 } |
| OLD | NEW |