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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 52 // Waits for a load stop for the specified |web_contents|'s controller, if the |
53 // tab is currently web_contents. Otherwise returns immediately. | 53 // tab is currently web_contents. Otherwise returns immediately. |
54 void WaitForLoadStop(WebContents* web_contents); | 54 void WaitForLoadStop(WebContents* web_contents); |
55 | 55 |
| 56 // Causes the specified web_contents to crash. Blocks until it is crashed. |
| 57 void CrashTab(WebContents* web_contents); |
| 58 |
56 // Simulates clicking at the center of the given tab asynchronously. | 59 // Simulates clicking at the center of the given tab asynchronously. |
57 void SimulateMouseClick(WebContents* web_contents); | 60 void SimulateMouseClick(WebContents* web_contents); |
58 | 61 |
59 // Simulates asynchronously a mouse enter/move/leave event. | 62 // Simulates asynchronously a mouse enter/move/leave event. |
60 void SimulateMouseEvent(WebContents* web_contents, | 63 void SimulateMouseEvent(WebContents* web_contents, |
61 WebKit::WebInputEvent::Type type, | 64 WebKit::WebInputEvent::Type type, |
62 const gfx::Point& point); | 65 const gfx::Point& point); |
63 | 66 |
64 // Sends a key press asynchronously. | 67 // Sends a key press asynchronously. |
65 void SimulateKeyPress(WebContents* web_contents, | 68 void SimulateKeyPress(WebContents* web_contents, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 198 |
196 // If the python websocket server serves with TLS. | 199 // If the python websocket server serves with TLS. |
197 bool secure_; | 200 bool secure_; |
198 | 201 |
199 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); | 202 DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer); |
200 }; | 203 }; |
201 | 204 |
202 } // namespace content | 205 } // namespace content |
203 | 206 |
204 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 207 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |