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 #include "chrome/browser/bookmarks/bookmark_model.h" | 5 #include "chrome/browser/bookmarks/bookmark_model.h" |
6 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 6 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
8 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" | 8 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
9 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 9 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" |
11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
| 12 #include "chrome/test/base/testing_profile.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
14 #import "third_party/ocmock/OCMock/OCMock.h" | 15 #import "third_party/ocmock/OCMock/OCMock.h" |
15 #include "third_party/ocmock/gtest_support.h" | 16 #include "third_party/ocmock/gtest_support.h" |
16 | 17 |
17 @interface OCMockObject(PreventRetainCycle) | 18 @interface OCMockObject(PreventRetainCycle) |
18 - (void)clearRecordersAndExpectations; | 19 - (void)clearRecordersAndExpectations; |
19 @end | 20 @end |
20 | 21 |
21 @implementation OCMockObject(PreventRetainCycle) | 22 @implementation OCMockObject(PreventRetainCycle) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 114 |
114 base::scoped_nsobject<BookmarkFolderTarget> target( | 115 base::scoped_nsobject<BookmarkFolderTarget> target( |
115 [[BookmarkFolderTarget alloc] initWithController:controller]); | 116 [[BookmarkFolderTarget alloc] initWithController:controller]); |
116 | 117 |
117 [target openBookmarkFolderFromButton:sender]; | 118 [target openBookmarkFolderFromButton:sender]; |
118 EXPECT_OCMOCK_VERIFY(controller); | 119 EXPECT_OCMOCK_VERIFY(controller); |
119 | 120 |
120 // Break retain cycles. | 121 // Break retain cycles. |
121 [controller clearRecordersAndExpectations]; | 122 [controller clearRecordersAndExpectations]; |
122 } | 123 } |
OLD | NEW |