OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest
.h" | 5 #import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest
.h" |
6 | 6 |
7 #include "chrome/browser/bookmarks/bookmark_model.h" | 7 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 | 9 |
9 @implementation FakeAppDelegate | 10 @implementation FakeAppDelegate |
10 | 11 |
11 @synthesize test = test_; | 12 @synthesize test = test_; |
12 | 13 |
13 - (Profile*)lastProfile { | 14 - (Profile*)lastProfile { |
14 if (!test_) | 15 if (!test_) |
15 return NULL; | 16 return NULL; |
16 return test_->profile(); | 17 return test_->profile(); |
17 } | 18 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 DCHECK([NSApp delegate] == nil); | 63 DCHECK([NSApp delegate] == nil); |
63 [NSApp setDelegate:appDelegate_]; | 64 [NSApp setDelegate:appDelegate_]; |
64 const BookmarkNode* root = model().bookmark_bar_node(); | 65 const BookmarkNode* root = model().bookmark_bar_node(); |
65 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); | 66 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); |
66 model_test_utils::AddNodesFromModelString(model(), root, modelString); | 67 model_test_utils::AddNodesFromModelString(model(), root, modelString); |
67 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] | 68 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] |
68 initWithBookmarkNode:model().bookmark_bar_node()]); | 69 initWithBookmarkNode:model().bookmark_bar_node()]); |
69 } | 70 } |
70 | 71 |
71 BookmarkModel& BookmarkAppleScriptTest::model() { | 72 BookmarkModel& BookmarkAppleScriptTest::model() { |
72 return *profile()->GetBookmarkModel(); | 73 return *BookmarkModelFactory::GetForProfile(profile()); |
73 } | 74 } |
OLD | NEW |