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