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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const gfx::Point& point); | 112 const gfx::Point& point); |
113 | 113 |
114 // Simulates asynchronously a mouse enter/move/leave event. | 114 // Simulates asynchronously a mouse enter/move/leave event. |
115 void SimulateMouseEvent(WebContents* web_contents, | 115 void SimulateMouseEvent(WebContents* web_contents, |
116 blink::WebInputEvent::Type type, | 116 blink::WebInputEvent::Type type, |
117 const gfx::Point& point); | 117 const gfx::Point& point); |
118 | 118 |
119 // Taps the screen at |point|. | 119 // Taps the screen at |point|. |
120 void SimulateTapAt(WebContents* web_contents, const gfx::Point& point); | 120 void SimulateTapAt(WebContents* web_contents, const gfx::Point& point); |
121 | 121 |
| 122 // Taps the screen with modifires at |point|. |
| 123 void SimulateTapWithModifiersAt(WebContents* web_contents, |
| 124 unsigned Modifiers, |
| 125 const gfx::Point& point); |
| 126 |
122 // Sends a key press asynchronously. | 127 // Sends a key press asynchronously. |
123 // The native code of the key event will be set to InvalidNativeKeycode(). | 128 // The native code of the key event will be set to InvalidNativeKeycode(). |
124 // |key_code| alone is good enough for scenarios that only need the char | 129 // |key_code| alone is good enough for scenarios that only need the char |
125 // value represented by a key event and not the physical key on the keyboard | 130 // value represented by a key event and not the physical key on the keyboard |
126 // or the keyboard layout. | 131 // or the keyboard layout. |
127 // For scenarios such as chromoting that need the native code, | 132 // For scenarios such as chromoting that need the native code, |
128 // SimulateKeyPressWithCode should be used. | 133 // SimulateKeyPressWithCode should be used. |
129 void SimulateKeyPress(WebContents* web_contents, | 134 void SimulateKeyPress(WebContents* web_contents, |
130 ui::KeyboardCode key_code, | 135 ui::KeyboardCode key_code, |
131 bool control, | 136 bool control, |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 WebContents* web_contents_; | 394 WebContents* web_contents_; |
390 scoped_ptr<RenderViewCreatedObserver> child_observer_; | 395 scoped_ptr<RenderViewCreatedObserver> child_observer_; |
391 scoped_refptr<MessageLoopRunner> runner_; | 396 scoped_refptr<MessageLoopRunner> runner_; |
392 | 397 |
393 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); | 398 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); |
394 }; | 399 }; |
395 | 400 |
396 } // namespace content | 401 } // namespace content |
397 | 402 |
398 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 403 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |