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

Unified Diff: components/bookmarks/browser/bookmark_model_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
« no previous file with comments | « components/bookmarks/browser/bookmark_model.cc ('k') | components/bookmarks/browser/bookmark_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bookmarks/browser/bookmark_model_unittest.cc
diff --git a/components/bookmarks/browser/bookmark_model_unittest.cc b/components/bookmarks/browser/bookmark_model_unittest.cc
index 1ee3554e3cf0773b44bb6e163cc9776d25cc22aa..1f71f01a6286d39955bd2e404d3f7452138b2924 100644
--- a/components/bookmarks/browser/bookmark_model_unittest.cc
+++ b/components/bookmarks/browser/bookmark_model_unittest.cc
@@ -474,7 +474,7 @@ TEST_F(BookmarkModelTest, RemoveURL) {
model_->AddURL(root, 0, title, url);
ClearCounts();
- model_->Remove(root, 0);
+ model_->Remove(root->GetChild(0));
ASSERT_EQ(0, root->child_count());
AssertObserverCount(0, 0, 1, 0, 0, 1, 0, 0, 0);
observer_details_.ExpectEquals(root, NULL, 0, -1);
@@ -497,7 +497,7 @@ TEST_F(BookmarkModelTest, RemoveFolder) {
ClearCounts();
// Now remove the folder.
- model_->Remove(root, 0);
+ model_->Remove(root->GetChild(0));
ASSERT_EQ(0, root->child_count());
AssertObserverCount(0, 0, 1, 0, 0, 1, 0, 0, 0);
observer_details_.ExpectEquals(root, NULL, 0, -1);
@@ -612,7 +612,7 @@ TEST_F(BookmarkModelTest, Move) {
// And remove the folder.
ClearCounts();
- model_->Remove(root, 0);
+ model_->Remove(root->GetChild(0));
AssertObserverCount(0, 0, 1, 0, 0, 1, 0, 0, 0);
observer_details_.ExpectEquals(root, NULL, 0, -1);
EXPECT_TRUE(model_->GetMostRecentlyAddedUserNodeForURL(url) == NULL);
@@ -728,7 +728,7 @@ TEST_F(BookmarkModelTest, MostRecentlyModifiedFolders) {
// Nuke the folder and do another fetch, making sure folder isn't in the
// returned list.
- model_->Remove(folder->parent(), 0);
+ model_->Remove(folder->parent()->GetChild(0));
most_recent_folders = GetMostRecentlyModifiedUserFolders(model_.get(), 1);
ASSERT_EQ(1U, most_recent_folders.size());
ASSERT_TRUE(most_recent_folders[0] != folder);
« no previous file with comments | « components/bookmarks/browser/bookmark_model.cc ('k') | components/bookmarks/browser/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698