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

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

Issue 1105413002: Avoid conversion of index to BookmarkNode pointer unnacessarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 8 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 64cfc3294d10df30b1fc79d3bd62f3f2249cfa1f..f84b7ab1ba4bf987ca5849bdbc04a6c8dc825c9b 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
@@ -245,11 +245,13 @@ TEST_F(BookmarkBarViewTest, RemoveNode) {
EXPECT_EQ(2, test_helper_->GetBookmarkButtonCount());
// Remove the 2nd node, should still only have 1 visible.
- BookmarkModelFactory::GetForProfile(profile())->Remove(bookmark_bar_node, 1);
+ BookmarkModelFactory::GetForProfile(profile())
+ ->Remove(bookmark_bar_node->GetChild(1));
EXPECT_EQ("a", GetStringForVisibleButtons());
// Remove the first node, should force a new button (for the 'c' node).
- BookmarkModelFactory::GetForProfile(profile())->Remove(bookmark_bar_node, 0);
+ BookmarkModelFactory::GetForProfile(profile())
+ ->Remove(bookmark_bar_node->GetChild(0));
ASSERT_EQ("c", GetStringForVisibleButtons());
}

Powered by Google App Engine
This is Rietveld 408576698