Index: chrome/browser/search_engines/search_host_to_urls_map_unittest.cc |
diff --git a/chrome/browser/search_engines/search_host_to_urls_map_unittest.cc b/chrome/browser/search_engines/search_host_to_urls_map_unittest.cc |
index 501b7c723143caf94b10d5fa822fa60b02886ea8..f7e9af3d345f4dc1695cd0907ef8a9c474ec7837 100644 |
--- a/chrome/browser/search_engines/search_host_to_urls_map_unittest.cc |
+++ b/chrome/browser/search_engines/search_host_to_urls_map_unittest.cc |
@@ -7,6 +7,7 @@ |
#include "chrome/browser/search_engines/search_host_to_urls_map.h" |
#include "chrome/browser/search_engines/search_terms_data.h" |
#include "chrome/browser/search_engines/template_url.h" |
+#include "chrome/test/base/testing_profile.h" |
#include "testing/gtest/include/gtest/gtest.h" |
typedef SearchHostToURLsMap::TemplateURLSet TemplateURLSet; |
@@ -29,6 +30,7 @@ class SearchHostToURLsMapTest : public testing::Test { |
scoped_ptr<SearchHostToURLsMap> provider_map_; |
TemplateURL t_urls_[2]; |
std::string host_; |
+ TestingProfile profile_; |
Peter Kasting
2011/08/10 20:54:06
You don't need this. None of the SearchHostToURLs
|
DISALLOW_COPY_AND_ASSIGN(SearchHostToURLsMapTest); |
}; |
@@ -44,7 +46,7 @@ void SearchHostToURLsMapTest::SetUp() { |
template_urls.push_back(&t_urls_[1]); |
provider_map_.reset(new SearchHostToURLsMap); |
- UIThreadSearchTermsData search_terms_data; |
+ UIThreadSearchTermsData search_terms_data(&profile_); |
provider_map_->Init(template_urls, search_terms_data); |
} |
@@ -52,14 +54,14 @@ TEST_F(SearchHostToURLsMapTest, Add) { |
std::string new_host = "example.com"; |
TemplateURL new_t_url; |
new_t_url.SetURL("http://" + new_host + "/", 0, 0); |
- UIThreadSearchTermsData search_terms_data; |
+ UIThreadSearchTermsData search_terms_data(&profile_); |
provider_map_->Add(&new_t_url, search_terms_data); |
ASSERT_EQ(&new_t_url, provider_map_->GetTemplateURLForHost(new_host)); |
} |
TEST_F(SearchHostToURLsMapTest, Remove) { |
- provider_map_->Remove(&t_urls_[0]); |
+ provider_map_->Remove(&t_urls_[0], &profile_); |
const TemplateURL* found_url = provider_map_->GetTemplateURLForHost(host_); |
ASSERT_TRUE(found_url == &t_urls_[1]); |
@@ -81,15 +83,15 @@ TEST_F(SearchHostToURLsMapTest, Update) { |
TemplateURL new_values; |
new_values.SetURL("http://" + new_host + "/", 0, 0); |
- UIThreadSearchTermsData search_terms_data; |
- provider_map_->Update(&t_urls_[0], new_values, search_terms_data); |
+ UIThreadSearchTermsData search_terms_data(&profile_); |
+ provider_map_->Update(&t_urls_[0], new_values, search_terms_data, &profile_); |
ASSERT_EQ(&t_urls_[0], provider_map_->GetTemplateURLForHost(new_host)); |
ASSERT_EQ(&t_urls_[1], provider_map_->GetTemplateURLForHost(host_)); |
} |
TEST_F(SearchHostToURLsMapTest, UpdateGoogleBaseURLs) { |
- UIThreadSearchTermsData search_terms_data; |
+ UIThreadSearchTermsData search_terms_data(&profile_); |
std::string google_base_url = "google.com"; |
SetGoogleBaseURL("http://" + google_base_url +"/"); |