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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 class WebContents; | 50 class WebContents; |
51 | 51 |
52 // Generate a URL for a file path including a query string. | 52 // Generate a URL for a file path including a query string. |
53 GURL GetFileUrlWithQuery(const base::FilePath& path, | 53 GURL GetFileUrlWithQuery(const base::FilePath& path, |
54 const std::string& query_string); | 54 const std::string& query_string); |
55 | 55 |
56 // Waits for a load stop for the specified |web_contents|'s controller, if the | 56 // Waits for a load stop for the specified |web_contents|'s controller, if the |
57 // tab is currently web_contents. Otherwise returns immediately. | 57 // tab is currently web_contents. Otherwise returns immediately. |
58 void WaitForLoadStop(WebContents* web_contents); | 58 void WaitForLoadStop(WebContents* web_contents); |
59 | 59 |
| 60 // If WebContent's view is currently being resized, this will wait for the ack |
| 61 // from the renderer that the resize is complete. If there's no resize in |
| 62 // progress, the method will return right away. |
| 63 void WaitForResizeComplete(WebContents* web_contents); |
| 64 |
60 // Causes the specified web_contents to crash. Blocks until it is crashed. | 65 // Causes the specified web_contents to crash. Blocks until it is crashed. |
61 void CrashTab(WebContents* web_contents); | 66 void CrashTab(WebContents* web_contents); |
62 | 67 |
63 // Simulates clicking at the center of the given tab asynchronously; modifiers | 68 // Simulates clicking at the center of the given tab asynchronously; modifiers |
64 // may contain bits from WebInputEvent::Modifiers. | 69 // may contain bits from WebInputEvent::Modifiers. |
65 void SimulateMouseClick(WebContents* web_contents, | 70 void SimulateMouseClick(WebContents* web_contents, |
66 int modifiers, | 71 int modifiers, |
67 blink::WebMouseEvent::Button button); | 72 blink::WebMouseEvent::Button button); |
68 | 73 |
69 // Simulates clicking at the point |point| of the given tab asynchronously; | 74 // Simulates clicking at the point |point| of the given tab asynchronously; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 NotificationRegistrar registrar_; | 297 NotificationRegistrar registrar_; |
293 std::queue<std::string> message_queue_; | 298 std::queue<std::string> message_queue_; |
294 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 299 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
295 | 300 |
296 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); | 301 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); |
297 }; | 302 }; |
298 | 303 |
299 } // namespace content | 304 } // namespace content |
300 | 305 |
301 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 306 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |