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_test.h" | 5 #import "chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_test.h" |
6 | 6 |
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "components/bookmarks/browser/bookmark_model.h" | 10 #include "components/bookmarks/browser/bookmark_model.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 @end | 43 @end |
44 | 44 |
45 BookmarkAppleScriptTest::BookmarkAppleScriptTest() { | 45 BookmarkAppleScriptTest::BookmarkAppleScriptTest() { |
46 } | 46 } |
47 | 47 |
48 BookmarkAppleScriptTest::~BookmarkAppleScriptTest() { | 48 BookmarkAppleScriptTest::~BookmarkAppleScriptTest() { |
49 } | 49 } |
50 | 50 |
51 void BookmarkAppleScriptTest::SetUpOnMainThread() { | 51 void BookmarkAppleScriptTest::SetUpOnMainThread() { |
52 InProcessBrowserTest::SetUpOnMainThread(); | |
53 ASSERT_TRUE(profile()); | 52 ASSERT_TRUE(profile()); |
54 | 53 |
55 BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile()); | 54 BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile()); |
56 const BookmarkNode* root = model->bookmark_bar_node(); | 55 const BookmarkNode* root = model->bookmark_bar_node(); |
57 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); | 56 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); |
58 bookmarks::test::AddNodesFromModelString(model, root, modelString); | 57 bookmarks::test::AddNodesFromModelString(model, root, modelString); |
59 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] | 58 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] |
60 initWithBookmarkNode:model->bookmark_bar_node()]); | 59 initWithBookmarkNode:model->bookmark_bar_node()]); |
61 } | 60 } |
62 | 61 |
63 Profile* BookmarkAppleScriptTest::profile() const { | 62 Profile* BookmarkAppleScriptTest::profile() const { |
64 return browser()->profile(); | 63 return browser()->profile(); |
65 } | 64 } |
OLD | NEW |