1731df977c0511bca2206b5f333555b1205ff1f43Iain Merrick// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Use of this source code is governed by a BSD-style license that can be
3c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// found in the LICENSE file.
4c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
521d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
621d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
73345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick#pragma once
8c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
9c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch#import <Foundation/Foundation.h>
10c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
1121d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
1221d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
1321d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
14c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
15c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@interface BookmarkBarController (BookmarkBarUnitTestHelper)
16c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
17c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the bookmark button from this bar controller with the given
18c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// |title|, otherwise nil. This does not recurse into folders.
19c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;
20c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
21c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@end
22c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
23c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
24c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@interface BookmarkBarFolderController (BookmarkBarUnitTestHelper)
25c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
26c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the bookmark button from this folder controller with the given
27c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// |title|, otherwise nil. This does not recurse into subfolders.
28c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;
29c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
30c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@end
31c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
32c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
33c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@interface BookmarkButton (BookmarkBarUnitTestHelper)
34c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
35c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the center of the button in the base coordinate system of the
36c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// containing window. Useful for simulating mouse clicks or drags.
37c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (NSPoint)center;
38c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
39c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the top of the button in the base coordinate system of the
40c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// containing window.
41c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (NSPoint)top;
42c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
43c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the bottom of the button in the base coordinate system of the
44c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// containing window.
45c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (NSPoint)bottom;
46c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
47c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the center-left point of the button in the base coordinate system
48c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// of the containing window.
49c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (NSPoint)left;
50c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
51c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// Return the center-right point of the button in the base coordinate system
52c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch// of the containing window.
53c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch- (NSPoint)right;
54c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
55c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch@end
56c407dc5cd9bdc5668497f21b26b09d988ab439deBen Murdoch
5721d179b334e59e9a3bfcaed4c4430bef1bc5759dKristian Monsen#endif  // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_UNITTEST_HELPER_H_
58