OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_TEST_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_UI_TEST_UTILS_H_ |
6 #define CHROME_TEST_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_UI_TEST_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/browser/view_ids.h" |
12 #include "chrome/common/notification_observer.h" | 13 #include "chrome/common/notification_observer.h" |
13 #include "chrome/common/notification_type.h" | 14 #include "chrome/common/notification_type.h" |
14 | 15 |
15 class AppModalDialog; | 16 class AppModalDialog; |
16 class Browser; | 17 class Browser; |
17 class DownloadManager; | 18 class DownloadManager; |
18 class GURL; | 19 class GURL; |
19 class NavigationController; | 20 class NavigationController; |
20 class RenderViewHost; | 21 class RenderViewHost; |
21 class TabContents; | 22 class TabContents; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 116 |
116 // Performs a find in the page of the specified tab. Returns the number of | 117 // Performs a find in the page of the specified tab. Returns the number of |
117 // matches found. |ordinal| is an optional parameter which is set to the index | 118 // matches found. |ordinal| is an optional parameter which is set to the index |
118 // of the current match. | 119 // of the current match. |
119 int FindInPage(TabContents* tab, | 120 int FindInPage(TabContents* tab, |
120 const string16& search_string, | 121 const string16& search_string, |
121 bool forward, | 122 bool forward, |
122 bool case_sensitive, | 123 bool case_sensitive, |
123 int* ordinal); | 124 int* ordinal); |
124 | 125 |
| 126 // Returns true if the View is focused. |
| 127 bool IsViewFocused(const Browser* browser, ViewID vid); |
| 128 |
| 129 // Simulates a mouse click on a View in the browser. |
| 130 void ClickOnView(const Browser* browser, ViewID vid); |
| 131 |
125 // Register |observer| for the given |type| and run the message loop until | 132 // Register |observer| for the given |type| and run the message loop until |
126 // either the observer posts a quit task or we timeout. | 133 // either the observer posts a quit task or we timeout. |
127 void RegisterAndWait(NotificationType::Type type, | 134 void RegisterAndWait(NotificationType::Type type, |
128 NotificationObserver* observer, | 135 NotificationObserver* observer, |
129 int64 timeout_ms); | 136 int64 timeout_ms); |
130 | 137 |
131 } // namespace ui_test_utils | 138 } // namespace ui_test_utils |
132 | 139 |
133 #endif // CHROME_TEST_UI_TEST_UTILS_H_ | 140 #endif // CHROME_TEST_UI_TEST_UTILS_H_ |
OLD | NEW |