summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/bookmarks/bookmark_model.h6
-rw-r--r--chrome/browser/views/bookmark_bar_view_test.cc1
2 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h
index 675405b..332e599 100644
--- a/chrome/browser/bookmarks/bookmark_model.h
+++ b/chrome/browser/bookmarks/bookmark_model.h
@@ -284,6 +284,12 @@ class BookmarkModel : public NotificationObserver, public BookmarkService {
Profile* profile() const { return profile_; }
+
+ // Sets the BookmarkStorage. This is intended for testing.
+ void set_store(BookmarkStorage* store) {
+ store_ = store;
+ }
+
private:
// Used to order BookmarkNodes by URL.
class NodeURLComparator {
diff --git a/chrome/browser/views/bookmark_bar_view_test.cc b/chrome/browser/views/bookmark_bar_view_test.cc
index 8d31eb1..0ab25db 100644
--- a/chrome/browser/views/bookmark_bar_view_test.cc
+++ b/chrome/browser/views/bookmark_bar_view_test.cc
@@ -78,6 +78,7 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase {
profile_->GetPrefs()->SetBoolean(prefs::kShowBookmarkBar, true);
model_ = profile_->GetBookmarkModel();
+ model_->set_store(NULL);
bb_view_ = new BookmarkBarView(profile_.get(), NULL);
bb_view_->SetPageNavigator(&navigator_);