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/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 }; | 182 }; |
183 | 183 |
184 SearchProviderInstallDataTest::SearchProviderInstallDataTest() | 184 SearchProviderInstallDataTest::SearchProviderInstallDataTest() |
185 : install_data_(NULL) { | 185 : install_data_(NULL) { |
186 } | 186 } |
187 | 187 |
188 void SearchProviderInstallDataTest::SetUp() { | 188 void SearchProviderInstallDataTest::SetUp() { |
189 testing::Test::SetUp(); | 189 testing::Test::SetUp(); |
190 util_.SetUp(); | 190 util_.SetUp(); |
191 util_.StartIOThread(); | 191 util_.StartIOThread(); |
192 install_data_ = new SearchProviderInstallData(util_.GetWebDataService(), | 192 install_data_ = new SearchProviderInstallData(util_.profile(), |
193 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, | 193 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
194 content::Source<SearchProviderInstallDataTest>(this)); | 194 content::Source<SearchProviderInstallDataTest>(this)); |
195 } | 195 } |
196 | 196 |
197 void SearchProviderInstallDataTest::TearDown() { | 197 void SearchProviderInstallDataTest::TearDown() { |
198 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, install_data_); | 198 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, install_data_); |
199 install_data_ = NULL; | 199 install_data_ = NULL; |
200 | 200 |
201 // Make sure that the install data class on the UI thread gets cleaned up. | 201 // Make sure that the install data class on the UI thread gets cleaned up. |
202 // It doesn't matter that this happens after install_data_ is deleted. | 202 // It doesn't matter that this happens after install_data_ is deleted. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 // Change the Google base url. | 319 // Change the Google base url. |
320 google_host = "foo.com"; | 320 google_host = "foo.com"; |
321 util_.SetGoogleBaseURL("http://" + google_host + "/"); | 321 util_.SetGoogleBaseURL("http://" + google_host + "/"); |
322 // Wait for the I/O thread to process the update notification. | 322 // Wait for the I/O thread to process the update notification. |
323 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); | 323 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); |
324 | 324 |
325 // Verify that the change got picked up. | 325 // Verify that the change got picked up. |
326 test_get_install_state->set_search_provider_host(google_host); | 326 test_get_install_state->set_search_provider_host(google_host); |
327 EXPECT_TRUE(test_get_install_state->RunTests()); | 327 EXPECT_TRUE(test_get_install_state->RunTests()); |
328 } | 328 } |
OLD | NEW |