Index: chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm |
index bd8eda4644065f05b457fd20b9d8cca3083db013..5a9a0958c52554298774c4ca35ba2172dcb54f25 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm |
@@ -32,7 +32,8 @@ class BookmarkEditorControllerTest : public CocoaProfileTest { |
CocoaProfileTest::SetUp(); |
ASSERT_TRUE(profile()); |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
default_parent_ = model->bookmark_bar_node(); |
default_name_ = "http://www.zim-bop-a-dee.com/"; |
default_title_ = ASCIIToUTF16("ooh title"); |
@@ -95,7 +96,7 @@ TEST_F(BookmarkEditorControllerTest, EditAndFixPrefix) { |
TEST_F(BookmarkEditorControllerTest, NodeDeleted) { |
// Delete the bookmark being edited and verify the sheet cancels itself: |
ASSERT_TRUE([test_window() attachedSheet]); |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile()); |
model->Remove(default_parent_->GetChild(0)); |
ASSERT_FALSE([test_window() attachedSheet]); |
} |
@@ -146,7 +147,8 @@ class BookmarkEditorControllerNoNodeTest : public CocoaProfileTest { |
CocoaProfileTest::SetUp(); |
ASSERT_TRUE(profile()); |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
const BookmarkNode* parent = model->bookmark_bar_node(); |
controller_ = [[BookmarkEditorController alloc] |
initWithParentWindow:test_window() |
@@ -182,7 +184,8 @@ class BookmarkEditorControllerYesNodeTest : public CocoaProfileTest { |
CocoaProfileTest::SetUp(); |
ASSERT_TRUE(profile()); |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
const BookmarkNode* parent = model->bookmark_bar_node(); |
default_title_ = ASCIIToUTF16("wooh title"); |
const BookmarkNode* node = |
@@ -224,7 +227,8 @@ class BookmarkEditorControllerUtf8NodeTest : public CocoaProfileTest { |
CocoaProfileTest::SetUp(); |
ASSERT_TRUE(profile()); |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
const BookmarkNode* parent = model->bookmark_bar_node(); |
base::string16 title = ASCIIToUTF16("wooh title"); |
const char* url_name = "http://www.foobar.com/心得寫作"; |
@@ -278,7 +282,8 @@ class BookmarkEditorControllerTreeTest : public CocoaProfileTest { |
// bb-4 |
// b-1 |
// b-2 |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
const BookmarkNode* root = model->bookmark_bar_node(); |
folder_a_ = model->AddFolder(root, 0, ASCIIToUTF16("a")); |
model->AddURL(folder_a_, 0, ASCIIToUTF16("a-0"), GURL("http://a-0.com")); |
@@ -344,7 +349,8 @@ class BookmarkEditorControllerTreeTest : public CocoaProfileTest { |
// bookmark_bb_3_ so that it points to the new node for testing. |
void UpdateBB3() { |
std::vector<const BookmarkNode*> nodes; |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = |
+ BookmarkModelFactory::GetForBrowserContext(profile()); |
model->GetNodesByURL(bb3_url_1_, &nodes); |
if (nodes.empty()) |
model->GetNodesByURL(bb3_url_2_, &nodes); |
@@ -355,7 +361,7 @@ class BookmarkEditorControllerTreeTest : public CocoaProfileTest { |
}; |
TEST_F(BookmarkEditorControllerTreeTest, VerifyBookmarkTestModel) { |
- BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
+ BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile()); |
model->root_node(); |
const BookmarkNode* root = model->bookmark_bar_node(); |
EXPECT_EQ(4, root->child_count()); |