OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
9 #include "components/bookmarks/browser/bookmark_model.h" | 9 #include "components/bookmarks/browser/bookmark_model.h" |
10 #include "components/bookmarks/test/bookmark_test_helpers.h" | 10 #include "components/bookmarks/test/bookmark_test_helpers.h" |
11 | 11 |
12 using bookmarks::BookmarkModel; | 12 using bookmarks::BookmarkModel; |
| 13 using bookmarks::BookmarkNode; |
13 | 14 |
14 @implementation FakeAppDelegate | 15 @implementation FakeAppDelegate |
15 | 16 |
16 @synthesize test = test_; | 17 @synthesize test = test_; |
17 | 18 |
18 - (Profile*)lastProfile { | 19 - (Profile*)lastProfile { |
19 if (!test_) | 20 if (!test_) |
20 return NULL; | 21 return NULL; |
21 return test_->profile(); | 22 return test_->profile(); |
22 } | 23 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 [appDelegate_.get() setTest:this]; | 67 [appDelegate_.get() setTest:this]; |
67 DCHECK([NSApp delegate] == nil); | 68 DCHECK([NSApp delegate] == nil); |
68 [NSApp setDelegate:appDelegate_]; | 69 [NSApp setDelegate:appDelegate_]; |
69 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); | 70 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile()); |
70 const BookmarkNode* root = model->bookmark_bar_node(); | 71 const BookmarkNode* root = model->bookmark_bar_node(); |
71 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); | 72 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); |
72 bookmarks::test::AddNodesFromModelString(model, root, modelString); | 73 bookmarks::test::AddNodesFromModelString(model, root, modelString); |
73 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] | 74 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] |
74 initWithBookmarkNode:model->bookmark_bar_node()]); | 75 initWithBookmarkNode:model->bookmark_bar_node()]); |
75 } | 76 } |
OLD | NEW |