summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_unittest_helper.h
blob: c122dffa07738889b00f187c325a3bf1c4d2ed65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_COCOA_AUTOCOMPLETE_BOOKMARK_BAR_UNITTEST_HELPER_H_
#define CHROME_BROWSER_COCOA_AUTOCOMPLETE_BOOKMARK_BAR_UNITTEST_HELPER_H_

#import <Foundation/Foundation.h>

#import "chrome/browser/cocoa/bookmark_bar_controller.h"
#import "chrome/browser/cocoa/bookmark_bar_folder_controller.h"
#import "chrome/browser/cocoa/bookmark_button.h"

@interface BookmarkBarController (BookmarkBarUnitTestHelper)

// Return the bookmark button from this bar controller with the given
// |title|, otherwise nil. This does not recurse into folders.
- (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;

@end


@interface BookmarkBarFolderController (BookmarkBarUnitTestHelper)

// Return the bookmark button from this folder controller with the given
// |title|, otherwise nil. This does not recurse into subfolders.
- (BookmarkButton*)buttonWithTitleEqualTo:(NSString*)title;

@end


@interface BookmarkButton (BookmarkBarUnitTestHelper)

// Return the center of the button in the base coordinate system of the
// containing window. Useful for simulating mouse clicks or drags.
- (NSPoint)center;

// Return the top of the button in the base coordinate system of the
// containing window.
- (NSPoint)top;

// Return the bottom of the button in the base coordinate system of the
// containing window.
- (NSPoint)bottom;

// Return the center-left point of the button in the base coordinate system
// of the containing window.
- (NSPoint)left;

// Return the center-right point of the button in the base coordinate system
// of the containing window.
- (NSPoint)right;

@end

#endif  // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_UNITTEST_HELPER_H_