| Index: chrome/browser/autocomplete/history_quick_provider_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/autocomplete/history_quick_provider_unittest.cc (revision 103916)
|
| +++ chrome/browser/autocomplete/history_quick_provider_unittest.cc (working copy)
|
| @@ -142,6 +142,13 @@
|
| void HistoryQuickProviderTest::FillData() {
|
| history::URLDatabase* db = history_service_->InMemoryDatabase();
|
| ASSERT_TRUE(db != NULL);
|
| +
|
| + history::InMemoryURLIndex* index =
|
| + new history::InMemoryURLIndex(profile_.get(),
|
| + FilePath(FILE_PATH_LITERAL("/dummy")));
|
| + PrefService* prefs = profile_->GetPrefs();
|
| + std::string languages(prefs->GetString(prefs::kAcceptLanguages));
|
| + index->Init(db, languages);
|
| for (size_t i = 0; i < arraysize(quick_test_db); ++i) {
|
| const TestURLInfo& cur = quick_test_db[i];
|
| const GURL current_url(cur.url);
|
| @@ -153,20 +160,11 @@
|
| url_info.set_typed_count(cur.typed_count);
|
| url_info.set_last_visit(visit_time);
|
| url_info.set_hidden(false);
|
| - EXPECT_TRUE(db->AddURL(url_info));
|
| -
|
| - history_service_->AddPageWithDetails(current_url, UTF8ToUTF16(cur.title),
|
| - cur.visit_count, cur.typed_count,
|
| - visit_time, false,
|
| - history::SOURCE_BROWSED);
|
| + url_info.set_id(i);
|
| + index->UpdateURL(url_info);
|
| }
|
|
|
| - history::InMemoryURLIndex* index =
|
| - new history::InMemoryURLIndex(FilePath(FILE_PATH_LITERAL("/dummy")));
|
| - PrefService* prefs = profile_->GetPrefs();
|
| - std::string languages(prefs->GetString(prefs::kAcceptLanguages));
|
| - index->Init(db, languages);
|
| - provider_->SetIndexForTesting(index);
|
| + provider_->set_index(index);
|
| }
|
|
|
| HistoryQuickProviderTest::SetShouldContain::SetShouldContain(
|
|
|