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 defined(USE_AURA) |
| 61 // If WebContent's view is currently being resized, this will wait for the ack |
| 62 // from the renderer that the resize is complete and for the |
| 63 // WindowEventDispatcher to release the pointer moves. If there's no resize in |
| 64 // progress, the method will return right away. |
| 65 void WaitForResizeComplete(WebContents* web_contents); |
| 66 #endif // USE_AURA |
| 67 |
60 // Causes the specified web_contents to crash. Blocks until it is crashed. | 68 // Causes the specified web_contents to crash. Blocks until it is crashed. |
61 void CrashTab(WebContents* web_contents); | 69 void CrashTab(WebContents* web_contents); |
62 | 70 |
63 // Simulates clicking at the center of the given tab asynchronously; modifiers | 71 // Simulates clicking at the center of the given tab asynchronously; modifiers |
64 // may contain bits from WebInputEvent::Modifiers. | 72 // may contain bits from WebInputEvent::Modifiers. |
65 void SimulateMouseClick(WebContents* web_contents, | 73 void SimulateMouseClick(WebContents* web_contents, |
66 int modifiers, | 74 int modifiers, |
67 blink::WebMouseEvent::Button button); | 75 blink::WebMouseEvent::Button button); |
68 | 76 |
69 // Simulates clicking at the point |point| of the given tab asynchronously; | 77 // 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_; | 300 NotificationRegistrar registrar_; |
293 std::queue<std::string> message_queue_; | 301 std::queue<std::string> message_queue_; |
294 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 302 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
295 | 303 |
296 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); | 304 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); |
297 }; | 305 }; |
298 | 306 |
299 } // namespace content | 307 } // namespace content |
300 | 308 |
301 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 309 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |