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

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

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/history/history_backend_unittest.cc
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index b6230b38fc7c0eb5daf911504b07f148db81813b..36fae41d644e9e71feb5a328d5e16c38e6057ee2 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -36,6 +36,7 @@
#include "components/bookmarks/core/browser/bookmark_utils.h"
#include "components/bookmarks/core/test/bookmark_test_helpers.h"
#include "components/bookmarks/core/test/test_bookmark_client.h"
+#include "components/history/core/browser/test_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"
@@ -152,6 +153,7 @@ class HistoryBackendTestBase : public testing::Test {
std::make_pair(type, details.release()));
}
+ TestHistoryClient history_client_;
test::TestBookmarkClient bookmark_client_;
scoped_refptr<HistoryBackend> backend_; // Will be NULL on init failure.
scoped_ptr<InMemoryHistoryBackend> mem_backend_;
@@ -167,7 +169,7 @@ class HistoryBackendTestBase : public testing::Test {
&test_dir_))
return;
backend_ = new HistoryBackend(
- test_dir_, new HistoryBackendTestDelegate(this), bookmark_model_.get());
+ test_dir_, new HistoryBackendTestDelegate(this), &history_client_);
backend_->Init(std::string(), false);
}
@@ -1486,7 +1488,7 @@ TEST_F(HistoryBackendTest, MigrationVisitSource) {
backend_ = new HistoryBackend(new_history_path,
new HistoryBackendTestDelegate(this),
- bookmark_model_.get());
+ &history_client_);
backend_->Init(std::string(), false);
backend_->Closing();
backend_ = NULL;
@@ -2889,7 +2891,7 @@ TEST_F(HistoryBackendTest, MigrationVisitDuration) {
backend_ = new HistoryBackend(new_history_path,
new HistoryBackendTestDelegate(this),
- bookmark_model_.get());
+ &history_client_);
backend_->Init(std::string(), false);
backend_->Closing();
backend_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698