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

Unified Diff: chrome/browser/history/in_memory_url_index_unittest.cc

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android unit tests Created 6 years, 7 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 | « chrome/browser/history/in_memory_url_index.cc ('k') | chrome/browser/history/scored_history_match.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/in_memory_url_index_unittest.cc
diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
index f36eda57a9f64a3fdc25452e212d491681ee8b92..7463ec8d3f2d953fe1606d80a786392eb1611864 100644
--- a/chrome/browser/history/in_memory_url_index_unittest.cc
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -28,6 +28,7 @@
#include "chrome/test/base/history_index_restore_observer.h"
#include "chrome/test/base/testing_profile.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
+#include "components/history/core/browser/history_client.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_browser_thread.h"
@@ -277,8 +278,9 @@ void InMemoryURLIndexTest::SetUp() {
transaction.Commit();
}
- url_index_.reset(
- new InMemoryURLIndex(&profile_, base::FilePath(), "en,ja,hi,zh"));
+ url_index_.reset(new InMemoryURLIndex(
+ &profile_, base::FilePath(), "en,ja,hi,zh",
+ history_service_->history_client()));
url_index_->Init();
url_index_->RebuildFromHistory(history_database_);
}
@@ -435,8 +437,9 @@ TEST_F(LimitedInMemoryURLIndexTest, Initialization) {
uint64 row_count = 0;
while (statement.Step()) ++row_count;
EXPECT_EQ(1U, row_count);
- url_index_.reset(
- new InMemoryURLIndex(&profile_, base::FilePath(), "en,ja,hi,zh"));
+ url_index_.reset(new InMemoryURLIndex(
+ &profile_, base::FilePath(), "en,ja,hi,zh",
+ history_service_->history_client()));
url_index_->Init();
url_index_->RebuildFromHistory(history_database_);
URLIndexPrivateData& private_data(*GetPrivateData());
@@ -1157,9 +1160,10 @@ class InMemoryURLIndexCacheTest : public testing::Test {
void InMemoryURLIndexCacheTest::SetUp() {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
+ HistoryClient history_client;
base::FilePath path(temp_dir_.path());
- url_index_.reset(
- new InMemoryURLIndex(NULL, path, "en,ja,hi,zh"));
+ url_index_.reset(new InMemoryURLIndex(
+ NULL, path, "en,ja,hi,zh", &history_client));
}
void InMemoryURLIndexCacheTest::set_history_dir(
« no previous file with comments | « chrome/browser/history/in_memory_url_index.cc ('k') | chrome/browser/history/scored_history_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698