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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
8 #import <Foundation/Foundation.h>
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
14 @interface
BookmarkBarController (BookmarkBarUnitTestHelper
)
16 // Return the bookmark button from this bar controller with the given
17 // |title|, otherwise nil. This does not recurse into folders.
18 - (BookmarkButton
*)buttonWithTitleEqualTo
:(NSString
*)title
;
23 @interface
BookmarkBarFolderController (BookmarkBarUnitTestHelper
)
25 // Return the bookmark button from this folder controller with the given
26 // |title|, otherwise nil. This does not recurse into subfolders.
27 - (BookmarkButton
*)buttonWithTitleEqualTo
:(NSString
*)title
;
32 @interface
BookmarkButton (BookmarkBarUnitTestHelper
)
34 // Return the center of the button in the base coordinate system of the
35 // containing window. Useful for simulating mouse clicks or drags.
38 // Return the top of the button in the base coordinate system of the
42 // Return the bottom of the button in the base coordinate system of the
46 // Return the center-left point of the button in the base coordinate system
47 // of the containing window.
50 // Return the center-right point of the button in the base coordinate system
51 // of the containing window.
56 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_