| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/applescript/bookmark_applescript_utils_unittest.h" | 5 #import "chrome/browser/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 | 8 |
| 9 @implementation FakeAppDelegate | 9 @implementation FakeAppDelegate |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 [super dealloc]; | 44 [super dealloc]; |
| 45 } | 45 } |
| 46 | 46 |
| 47 @end | 47 @end |
| 48 | 48 |
| 49 BookmarkAppleScriptTest::BookmarkAppleScriptTest() { | 49 BookmarkAppleScriptTest::BookmarkAppleScriptTest() { |
| 50 appDelegate_.reset([[FakeAppDelegate alloc] init]); | 50 appDelegate_.reset([[FakeAppDelegate alloc] init]); |
| 51 [appDelegate_.get() setHelper:&helper_]; | 51 [appDelegate_.get() setHelper:&helper_]; |
| 52 [NSApp setDelegate:appDelegate_]; | 52 [NSApp setDelegate:appDelegate_]; |
| 53 const BookmarkNode* root = model().GetBookmarkBarNode(); | 53 const BookmarkNode* root = model().GetBookmarkBarNode(); |
| 54 const std::wstring modelString(L"a f1:[ b d c ] d f2:[ e f g ] h "); | 54 const std::string modelString("a f1:[ b d c ] d f2:[ e f g ] h "); |
| 55 model_test_utils::AddNodesFromModelString(model(), root, modelString); | 55 model_test_utils::AddNodesFromModelString(model(), root, modelString); |
| 56 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] | 56 bookmarkBar_.reset([[BookmarkFolderAppleScript alloc] |
| 57 initWithBookmarkNode:model().GetBookmarkBarNode()]); | 57 initWithBookmarkNode:model().GetBookmarkBarNode()]); |
| 58 } | 58 } |
| 59 | 59 |
| 60 BookmarkModel& BookmarkAppleScriptTest::model() { | 60 BookmarkModel& BookmarkAppleScriptTest::model() { |
| 61 return *helper_.profile()->GetBookmarkModel(); | 61 return *helper_.profile()->GetBookmarkModel(); |
| 62 } | 62 } |
| OLD | NEW |