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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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/ui/views/bookmarks/bookmark_bar_view_unittest.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
index f9f9b649764dbec31cf25717d57fb87c1e1f1185..5f92ab66c169c148865398553b998f6539377bdc 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
@@ -85,13 +85,14 @@ class BookmarkBarViewTest : public BrowserWithTestWindowTest {
void WaitForBookmarkModelToLoad() {
bookmarks::test::WaitForBookmarkModelToLoad(
- BookmarkModelFactory::GetForProfile(profile()));
+ BookmarkModelFactory::GetForBrowserContext(profile()));
}
// Adds nodes to the bookmark bar node from |string|. See
// bookmarks::test::AddNodesFromModelString() for details on |string|.
void AddNodesToBookmarkBarFromModelString(const std::string& string) {
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
+ BookmarkModel* model =
+ BookmarkModelFactory::GetForBrowserContext(profile());
bookmarks::test::AddNodesFromModelString(model, model->bookmark_bar_node(),
string);
}
@@ -196,7 +197,7 @@ TEST_F(BookmarkBarViewTest, OverflowVisibility) {
TEST_F(BookmarkBarViewTest, ButtonsDynamicallyAddedAfterModelHasNodes) {
profile()->CreateBookmarkModel(true);
WaitForBookmarkModelToLoad();
- EXPECT_TRUE(BookmarkModelFactory::GetForProfile(profile())->loaded());
+ EXPECT_TRUE(BookmarkModelFactory::GetForBrowserContext(profile())->loaded());
AddNodesToBookmarkBarFromModelString("a b c d e f ");
CreateBookmarkBarView();
EXPECT_EQ(0, test_helper_->GetBookmarkButtonCount());
@@ -214,7 +215,7 @@ TEST_F(BookmarkBarViewTest, ButtonsDynamicallyAddedAfterModelHasNodes) {
// Verifies buttons are added as the model and size change.
TEST_F(BookmarkBarViewTest, ButtonsDynamicallyAdded) {
CreateBookmarkModelAndBookmarkBarView();
- EXPECT_TRUE(BookmarkModelFactory::GetForProfile(profile())->loaded());
+ EXPECT_TRUE(BookmarkModelFactory::GetForBrowserContext(profile())->loaded());
AddNodesToBookmarkBarFromModelString("a b c d e f ");
EXPECT_EQ(0, test_helper_->GetBookmarkButtonCount());
SizeUntilButtonsVisible(1);
@@ -239,7 +240,7 @@ TEST_F(BookmarkBarViewTest, AddNodesWhenBarAlreadySized) {
// Various assertions for removing nodes.
TEST_F(BookmarkBarViewTest, RemoveNode) {
CreateBookmarkModelAndBookmarkBarView();
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile());
const BookmarkNode* bookmark_bar_node = model->bookmark_bar_node();
AddNodesToBookmarkBarFromModelString("a b c d e f ");
EXPECT_EQ(0, test_helper_->GetBookmarkButtonCount());
@@ -258,7 +259,7 @@ TEST_F(BookmarkBarViewTest, RemoveNode) {
// Assertions for moving a node on the bookmark bar.
TEST_F(BookmarkBarViewTest, MoveNode) {
CreateBookmarkModelAndBookmarkBarView();
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile());
const BookmarkNode* bookmark_bar_node = model->bookmark_bar_node();
AddNodesToBookmarkBarFromModelString("a b c d e f ");
EXPECT_EQ(0, test_helper_->GetBookmarkButtonCount());
@@ -290,7 +291,7 @@ TEST_F(BookmarkBarViewTest, MoveNode) {
// Assertions for changing the title of a node.
TEST_F(BookmarkBarViewTest, ChangeTitle) {
CreateBookmarkModelAndBookmarkBarView();
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile());
const BookmarkNode* bookmark_bar_node = model->bookmark_bar_node();
AddNodesToBookmarkBarFromModelString("a b c d e f ");
EXPECT_EQ(0, test_helper_->GetBookmarkButtonCount());
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698