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

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

Issue 10834161: Removing instances of profile_->GetBookmarkModel() as part of converting BookmarkModel to a PKS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm (revision 149630)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm (working copy)
@@ -6,6 +6,7 @@
#include "base/memory/scoped_nsobject.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -18,7 +19,7 @@
// Simple add of a node (at the end).
TEST_F(BookmarkNameFolderControllerTest, AddNew) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
@@ -48,7 +49,7 @@
// Add new but specify a sibling.
TEST_F(BookmarkNameFolderControllerTest, AddNewWithSibling) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
// Add 2 nodes. We will place the new folder in the middle of these.
@@ -78,7 +79,7 @@
// Make sure we are allowed to create a folder named "New Folder".
TEST_F(BookmarkNameFolderControllerTest, AddNewDefaultName) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
@@ -99,7 +100,7 @@
// Make sure we are allowed to create a folder with an empty name.
TEST_F(BookmarkNameFolderControllerTest, AddNewBlankName) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
@@ -119,7 +120,7 @@
}
TEST_F(BookmarkNameFolderControllerTest, Rename) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
const BookmarkNode* folder = model->AddFolder(parent,
parent->child_count(),
@@ -143,7 +144,7 @@
}
TEST_F(BookmarkNameFolderControllerTest, EditAndConfirmOKButton) {
- BookmarkModel* model = profile()->GetBookmarkModel();
+ BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile());
const BookmarkNode* parent = model->bookmark_bar_node();
EXPECT_EQ(0, parent->child_count());
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698