Index: chrome/browser/autocomplete/history_quick_provider_unittest.cc |
=================================================================== |
--- chrome/browser/autocomplete/history_quick_provider_unittest.cc (revision 120346) |
+++ chrome/browser/autocomplete/history_quick_provider_unittest.cc (working copy) |
@@ -99,11 +99,8 @@ |
}; |
void SetUp(); |
+ void TearDown(); |
- void TearDown() { |
- provider_ = NULL; |
- } |
- |
virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); |
// Fills test data into the history system. |
@@ -141,6 +138,10 @@ |
FillData(); |
} |
+void HistoryQuickProviderTest::TearDown() { |
+ provider_ = NULL; |
+} |
+ |
void HistoryQuickProviderTest::OnProviderUpdate(bool updated_matches) { |
MessageLoop::current()->Quit(); |
} |
@@ -156,12 +157,17 @@ |
void HistoryQuickProviderTest::FillData() { |
history::URLDatabase* db = history_service_->InMemoryDatabase(); |
ASSERT_TRUE(db != NULL); |
- |
+#if 1 |
+// DO WE WANT THIS CHANGE? |
Peter Kasting
2012/02/04 02:20:31
?
mrossetti
2012/02/04 04:30:53
I apologize. I thought I'd gotten all the conditio
|
+ history::InMemoryURLIndex* index = provider_->GetIndex(); |
+#else |
+// CURRENT REPO |
history::InMemoryURLIndex* index = |
new history::InMemoryURLIndex(FilePath()); |
PrefService* prefs = profile_->GetPrefs(); |
std::string languages(prefs->GetString(prefs::kAcceptLanguages)); |
index->Init(db, languages); |
+#endif |
size_t data_count = 0; |
TestURLInfo* test_data = NULL; |
GetTestData(&data_count, &test_data); |
@@ -171,15 +177,14 @@ |
Time visit_time = Time::Now() - TimeDelta::FromDays(cur.days_from_now); |
history::URLRow url_info(current_url); |
+ url_info.set_id(i + 5000); |
url_info.set_title(UTF8ToUTF16(cur.title)); |
url_info.set_visit_count(cur.visit_count); |
url_info.set_typed_count(cur.typed_count); |
url_info.set_last_visit(visit_time); |
url_info.set_hidden(false); |
- index->UpdateURL(i, url_info); |
+ index->UpdateURL(url_info); |
} |
- |
- provider_->set_index(index); |
} |
HistoryQuickProviderTest::SetShouldContain::SetShouldContain( |