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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // content\test\content_browser_test_utils.h. | 43 // content\test\content_browser_test_utils.h. |
44 | 44 |
45 namespace content { | 45 namespace content { |
46 | 46 |
47 class BrowserContext; | 47 class BrowserContext; |
48 class MessageLoopRunner; | 48 class MessageLoopRunner; |
49 class RenderViewHost; | 49 class RenderViewHost; |
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 FilePath& path, const std::string& query_string); | 53 GURL GetFileUrlWithQuery(const base::FilePath& path, |
| 54 const std::string& query_string); |
54 | 55 |
55 // 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 |
56 // tab is currently web_contents. Otherwise returns immediately. | 57 // tab is currently web_contents. Otherwise returns immediately. |
57 void WaitForLoadStop(WebContents* web_contents); | 58 void WaitForLoadStop(WebContents* web_contents); |
58 | 59 |
59 // Causes the specified web_contents to crash. Blocks until it is crashed. | 60 // Causes the specified web_contents to crash. Blocks until it is crashed. |
60 void CrashTab(WebContents* web_contents); | 61 void CrashTab(WebContents* web_contents); |
61 | 62 |
62 // Simulates clicking at the center of the given tab asynchronously; modifiers | 63 // Simulates clicking at the center of the given tab asynchronously; modifiers |
63 // may contain bits from WebInputEvent::Modifiers. | 64 // may contain bits from WebInputEvent::Modifiers. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 std::queue<std::string> message_queue_; | 213 std::queue<std::string> message_queue_; |
213 bool waiting_for_message_; | 214 bool waiting_for_message_; |
214 scoped_refptr<MessageLoopRunner> message_loop_runner_; | 215 scoped_refptr<MessageLoopRunner> message_loop_runner_; |
215 | 216 |
216 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); | 217 DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue); |
217 }; | 218 }; |
218 | 219 |
219 } // namespace content | 220 } // namespace content |
220 | 221 |
221 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 222 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |