| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const gfx::Vector2d& delta); | 122 const gfx::Vector2d& delta); |
| 123 | 123 |
| 124 // Sends a simple, three-event (Begin/Update/End) gesture scroll. | 124 // Sends a simple, three-event (Begin/Update/End) gesture scroll. |
| 125 void SimulateGestureScrollSequence(WebContents* web_contents, | 125 void SimulateGestureScrollSequence(WebContents* web_contents, |
| 126 const gfx::Point& point, | 126 const gfx::Point& point, |
| 127 const gfx::Vector2dF& delta); | 127 const gfx::Vector2dF& delta); |
| 128 | 128 |
| 129 // Taps the screen at |point|. | 129 // Taps the screen at |point|. |
| 130 void SimulateTapAt(WebContents* web_contents, const gfx::Point& point); | 130 void SimulateTapAt(WebContents* web_contents, const gfx::Point& point); |
| 131 | 131 |
| 132 #if defined(USE_AURA) |
| 132 // Generates a TouchStart at |point|. | 133 // Generates a TouchStart at |point|. |
| 133 void SimulateTouchPressAt(WebContents* web_contents, const gfx::Point& point); | 134 void SimulateTouchPressAt(WebContents* web_contents, const gfx::Point& point); |
| 135 #endif |
| 134 | 136 |
| 135 // Taps the screen with modifires at |point|. | 137 // Taps the screen with modifires at |point|. |
| 136 void SimulateTapWithModifiersAt(WebContents* web_contents, | 138 void SimulateTapWithModifiersAt(WebContents* web_contents, |
| 137 unsigned Modifiers, | 139 unsigned Modifiers, |
| 138 const gfx::Point& point); | 140 const gfx::Point& point); |
| 139 | 141 |
| 140 // Sends a key press asynchronously. | 142 // Sends a key press asynchronously. |
| 141 // The native code of the key event will be set to InvalidNativeKeycode(). | 143 // The native code of the key event will be set to InvalidNativeKeycode(). |
| 142 // |key_code| alone is good enough for scenarios that only need the char | 144 // |key_code| alone is good enough for scenarios that only need the char |
| 143 // value represented by a key event and not the physical key on the keyboard | 145 // value represented by a key event and not the physical key on the keyboard |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 432 |
| 431 int frames_to_wait_; | 433 int frames_to_wait_; |
| 432 base::Closure quit_; | 434 base::Closure quit_; |
| 433 | 435 |
| 434 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); | 436 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); |
| 435 }; | 437 }; |
| 436 | 438 |
| 437 } // namespace content | 439 } // namespace content |
| 438 | 440 |
| 439 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 441 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |