OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_BASE_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 bool case_sensitive, | 223 bool case_sensitive, |
224 int* ordinal); | 224 int* ordinal); |
225 | 225 |
226 // Returns true if the View is focused. | 226 // Returns true if the View is focused. |
227 bool IsViewFocused(const Browser* browser, ViewID vid); | 227 bool IsViewFocused(const Browser* browser, ViewID vid); |
228 | 228 |
229 // Simulates a mouse click on a View in the browser. | 229 // Simulates a mouse click on a View in the browser. |
230 void ClickOnView(const Browser* browser, ViewID vid); | 230 void ClickOnView(const Browser* browser, ViewID vid); |
231 | 231 |
232 // Blocks until a notification for given |type| is received. | 232 // Blocks until a notification for given |type| is received. |
233 // TODO(gbillock): remove this race hazard. | |
234 // Use WindowedNotificationObserver instead. | |
235 void WaitForNotification(int type); | 233 void WaitForNotification(int type); |
236 | 234 |
237 // Blocks until a notification for given |type| from the specified |source| | 235 // Blocks until a notification for given |type| from the specified |source| |
238 // is received. | 236 // is received. |
239 // TODO(gbillock): remove this race hazard. | |
240 // Use WindowedNotificationObserver instead. | |
241 void WaitForNotificationFrom(int type, | 237 void WaitForNotificationFrom(int type, |
242 const NotificationSource& source); | 238 const NotificationSource& source); |
243 | 239 |
244 // Register |observer| for the given |type| and |source| and run | 240 // Register |observer| for the given |type| and |source| and run |
245 // the message loop until the observer posts a quit task. | 241 // the message loop until the observer posts a quit task. |
246 void RegisterAndWait(NotificationObserver* observer, | 242 void RegisterAndWait(NotificationObserver* observer, |
247 int type, | 243 int type, |
248 const NotificationSource& source); | 244 const NotificationSource& source); |
249 | 245 |
250 // Blocks until |model| finishes loading. | 246 // Blocks until |model| finishes loading. |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 | 600 |
605 // Takes a snapshot of the entire page, according to the width and height | 601 // Takes a snapshot of the entire page, according to the width and height |
606 // properties of the DOM's document. Returns true on success. DOMAutomation | 602 // properties of the DOM's document. Returns true on success. DOMAutomation |
607 // must be enabled. | 603 // must be enabled. |
608 bool TakeEntirePageSnapshot(RenderViewHost* rvh, | 604 bool TakeEntirePageSnapshot(RenderViewHost* rvh, |
609 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 605 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
610 | 606 |
611 } // namespace ui_test_utils | 607 } // namespace ui_test_utils |
612 | 608 |
613 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 609 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
OLD | NEW |