| Index: chrome/browser/autocomplete/history_quick_provider_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/autocomplete/history_quick_provider_unittest.cc (revision 117518)
|
| +++ chrome/browser/autocomplete/history_quick_provider_unittest.cc (working copy)
|
| @@ -73,6 +73,8 @@
|
| "Dogs & Cats & Mice & Other Animals", 1, 1, 0},
|
| };
|
|
|
| +// -----------------------------------------------------------------------------
|
| +
|
| class HistoryQuickProviderTest : public testing::Test,
|
| public ACProviderListener {
|
| public:
|
| @@ -145,26 +147,21 @@
|
| history::URLDatabase* db = history_service_->InMemoryDatabase();
|
| ASSERT_TRUE(db != NULL);
|
|
|
| - history::InMemoryURLIndex* index =
|
| - new history::InMemoryURLIndex(FilePath());
|
| - PrefService* prefs = profile_->GetPrefs();
|
| - std::string languages(prefs->GetString(prefs::kAcceptLanguages));
|
| - index->Init(db, languages);
|
| + history::InMemoryURLIndex* index = provider_->GetIndex();
|
| for (size_t i = 0; i < arraysize(quick_test_db); ++i) {
|
| const TestURLInfo& cur = quick_test_db[i];
|
| const GURL current_url(cur.url);
|
| 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(
|
|
|