Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: chrome/browser/autocomplete/history_quick_provider_unittest.cc

Issue 9316109: Move Ownership of IMUI to HistoryService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/history/history.h » ('j') | chrome/browser/history/history.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | chrome/browser/history/history.h » ('j') | chrome/browser/history/history.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698