| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 int FindInPage(TabContents* tab, | 214 int FindInPage(TabContents* tab, |
| 215 const string16& search_string, | 215 const string16& search_string, |
| 216 bool forward, | 216 bool forward, |
| 217 bool case_sensitive, | 217 bool case_sensitive, |
| 218 int* ordinal); | 218 int* ordinal); |
| 219 | 219 |
| 220 // Closes all infobars |tab| has open, if any. Tests that depend on there being | 220 // Closes all infobars |tab| has open, if any. Tests that depend on there being |
| 221 // no InfoBar open when the test starts may need to use this. | 221 // no InfoBar open when the test starts may need to use this. |
| 222 void CloseAllInfoBars(TabContents* tab); | 222 void CloseAllInfoBars(TabContents* tab); |
| 223 | 223 |
| 224 // Simulates clicking at the given point on the given tab asynchronously. Unlike |
| 225 // ClickOnView, this works even if the browser isn't in the foreground. |
| 226 void SimulateMouseClick(content::WebContents* tab, const gfx::Point& point); |
| 227 |
| 224 // Simulates clicking at the center of the given tab asynchronously. Unlike | 228 // Simulates clicking at the center of the given tab asynchronously. Unlike |
| 225 // ClickOnView, this works even if the browser isn't in the foreground. | 229 // ClickOnView, this works even if the browser isn't in the foreground. |
| 226 void SimulateMouseClick(content::WebContents* tab); | 230 void SimulateMouseClick(content::WebContents* tab); |
| 227 | 231 |
| 228 // Simulates asynchronously a mouse enter/move/leave event. | 232 // Simulates asynchronously a mouse enter/move/leave event. |
| 229 void SimulateMouseEvent(content::WebContents* tab, | 233 void SimulateMouseEvent(content::WebContents* tab, |
| 230 WebKit::WebInputEvent::Type type, | 234 WebKit::WebInputEvent::Type type, |
| 231 const gfx::Point& point); | 235 const gfx::Point& point); |
| 232 | 236 |
| 233 // Sends a key press asynchronously. Unlike the SendKeyPress functions, this | 237 // Sends a key press asynchronously. Unlike the SendKeyPress functions, this |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 // ui_controls_linux.cc and ui_controls_mac.cc | 698 // ui_controls_linux.cc and ui_controls_mac.cc |
| 695 void ClickTask(ui_controls::MouseButton button, | 699 void ClickTask(ui_controls::MouseButton button, |
| 696 int state, | 700 int state, |
| 697 const base::Closure& followup); | 701 const base::Closure& followup); |
| 698 | 702 |
| 699 } // namespace internal | 703 } // namespace internal |
| 700 | 704 |
| 701 } // namespace ui_test_utils | 705 } // namespace ui_test_utils |
| 702 | 706 |
| 703 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 707 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |