| 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 CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void SimulateMouseClickAt(WebContents* web_contents, | 71 void SimulateMouseClickAt(WebContents* web_contents, |
| 72 int modifiers, | 72 int modifiers, |
| 73 blink::WebMouseEvent::Button button, | 73 blink::WebMouseEvent::Button button, |
| 74 const gfx::Point& point); | 74 const gfx::Point& point); |
| 75 | 75 |
| 76 // Simulates asynchronously a mouse enter/move/leave event. | 76 // Simulates asynchronously a mouse enter/move/leave event. |
| 77 void SimulateMouseEvent(WebContents* web_contents, | 77 void SimulateMouseEvent(WebContents* web_contents, |
| 78 blink::WebInputEvent::Type type, | 78 blink::WebInputEvent::Type type, |
| 79 const gfx::Point& point); | 79 const gfx::Point& point); |
| 80 | 80 |
| 81 // Taps the screen at |point|. |
| 82 void SimulateTapAt(WebContents* web_contents, const gfx::Point& point); |
| 83 |
| 81 // Sends a key press asynchronously. | 84 // Sends a key press asynchronously. |
| 82 // The native code of the key event will be set to InvalidNativeKeycode(). | 85 // The native code of the key event will be set to InvalidNativeKeycode(). |
| 83 // |key_code| alone is good enough for scenarios that only need the char | 86 // |key_code| alone is good enough for scenarios that only need the char |
| 84 // value represented by a key event and not the physical key on the keyboard | 87 // value represented by a key event and not the physical key on the keyboard |
| 85 // or the keyboard layout. | 88 // or the keyboard layout. |
| 86 // For scenarios such as chromoting that need the native code, | 89 // For scenarios such as chromoting that need the native code, |
| 87 // SimulateKeyPressWithCode should be used. | 90 // SimulateKeyPressWithCode should be used. |
| 88 void SimulateKeyPress(WebContents* web_contents, | 91 void SimulateKeyPress(WebContents* web_contents, |
| 89 ui::KeyboardCode key_code, | 92 ui::KeyboardCode key_code, |
| 90 bool control, | 93 bool control, |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 NotificationRegistrar registrar_; | 292 NotificationRegistrar registrar_; |
| 290 std::queue<std::string> message_queue_; | 293 std::queue<std::string> message_queue_; |
| 291 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 294 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
| 292 | 295 |
| 293 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); | 296 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); |
| 294 }; | 297 }; |
| 295 | 298 |
| 296 } // namespace content | 299 } // namespace content |
| 297 | 300 |
| 298 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 301 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |