- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / cocoa / bookmarks / bookmark_bar_unittest_helper.h
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.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
7
8 #import <Foundation/Foundation.h>
9
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"
13
14 @interface BookmarkBarController (BookmarkBarUnitTestHelper)
15
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;
19
20 @end
21
22
23 @interface BookmarkBarFolderController (BookmarkBarUnitTestHelper)
24
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;
28
29 @end
30
31
32 @interface BookmarkButton (BookmarkBarUnitTestHelper)
33
34 // Return the center of the button in the base coordinate system of the
35 // containing window. Useful for simulating mouse clicks or drags.
36 - (NSPoint)center;
37
38 // Return the top of the button in the base coordinate system of the
39 // containing window.
40 - (NSPoint)top;
41
42 // Return the bottom of the button in the base coordinate system of the
43 // containing window.
44 - (NSPoint)bottom;
45
46 // Return the center-left point of the button in the base coordinate system
47 // of the containing window.
48 - (NSPoint)left;
49
50 // Return the center-right point of the button in the base coordinate system
51 // of the containing window.
52 - (NSPoint)right;
53
54 @end
55
56 #endif  // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_