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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm

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/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
index 146dbbc95fcd594a642afdc2769c20f5138a77fb..7a1d74333503aed5e4b4d6d7f10124213a32aa60 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm
@@ -205,7 +205,7 @@ TEST_F(BookmarkEditorBaseControllerTest, SelectedFolderDeleted) {
EXPECT_EQ(folder_b_3_, [controller_ selectedNode]);
// Delete the selected node, and verify it's no longer selected:
- model->Remove(folder_b_, 3);
+ model->Remove(folder_b_->GetChild(3));
EXPECT_NE(folder_b_3_, [controller_ selectedNode]);
[controller_ cancel:nil];
@@ -218,7 +218,7 @@ TEST_F(BookmarkEditorBaseControllerTest, SelectedFoldersParentDeleted) {
EXPECT_EQ(folder_b_3_, [controller_ selectedNode]);
// Delete the selected node's parent, and verify it's no longer selected:
- model->Remove(root, 1);
+ model->Remove(root->GetChild(1));
EXPECT_NE(folder_b_3_, [controller_ selectedNode]);
[controller_ cancel:nil];

Powered by Google App Engine
This is Rietveld 408576698