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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 namespace content { | 43 namespace content { |
44 | 44 |
45 class MessageLoopRunner; | 45 class MessageLoopRunner; |
46 class RenderViewHost; | 46 class RenderViewHost; |
47 class WebContents; | 47 class WebContents; |
48 | 48 |
49 // Generate a URL for a file path including a query string. | 49 // Generate a URL for a file path including a query string. |
50 GURL GetFileUrlWithQuery(const FilePath& path, const std::string& query_string); | 50 GURL GetFileUrlWithQuery(const FilePath& path, const std::string& query_string); |
51 | 51 |
| 52 // Waits for a load stop for the specified |web_contents|'s controller, if the |
| 53 // tab is currently web_contents. Otherwise returns immediately. |
| 54 void WaitForLoadStop(WebContents* web_contents); |
| 55 |
52 // Simulates clicking at the center of the given tab asynchronously. | 56 // Simulates clicking at the center of the given tab asynchronously. |
53 void SimulateMouseClick(WebContents* web_contents); | 57 void SimulateMouseClick(WebContents* web_contents); |
54 | 58 |
55 // Simulates asynchronously a mouse enter/move/leave event. | 59 // Simulates asynchronously a mouse enter/move/leave event. |
56 void SimulateMouseEvent(WebContents* web_contents, | 60 void SimulateMouseEvent(WebContents* web_contents, |
57 WebKit::WebInputEvent::Type type, | 61 WebKit::WebInputEvent::Type type, |
58 const gfx::Point& point); | 62 const gfx::Point& point); |
59 | 63 |
60 // Sends a key press asynchronously. | 64 // Sends a key press asynchronously. |
61 void SimulateKeyPress(WebContents* web_contents, | 65 void SimulateKeyPress(WebContents* web_contents, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 195 |
192 // If the python websocket server serves with TLS. | 196 // If the python websocket server serves with TLS. |
193 bool secure_; | 197 bool secure_; |
194 | 198 |
195 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); | 199 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); |
196 }; | 200 }; |
197 | 201 |
198 } // namespace content | 202 } // namespace content |
199 | 203 |
200 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 204 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |