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_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
11 | 11 |
| 12 namespace base { |
12 class FilePath; | 13 class FilePath; |
| 14 } |
13 | 15 |
14 namespace gfx { | 16 namespace gfx { |
15 class Rect; | 17 class Rect; |
16 } | 18 } |
17 | 19 |
18 // A collections of functions designed for use with content_browsertests. | 20 // A collections of functions designed for use with content_browsertests. |
19 // Note: if a function here also works with browser_tests, it should be in | 21 // Note: if a function here also works with browser_tests, it should be in |
20 // content\public\test\browser_test_utils.h | 22 // content\public\test\browser_test_utils.h |
21 | 23 |
22 namespace content { | 24 namespace content { |
23 | 25 |
24 class MessageLoopRunner; | 26 class MessageLoopRunner; |
25 class Shell; | 27 class Shell; |
26 | 28 |
27 // Generate the file path for testing a particular test. | 29 // Generate the file path for testing a particular test. |
28 // The file for the tests is all located in | 30 // The file for the tests is all located in |
29 // content/test/data/dir/<file> | 31 // content/test/data/dir/<file> |
30 // The returned path is FilePath format. | 32 // The returned path is FilePath format. |
31 FilePath GetTestFilePath(const char* dir, const char* file); | 33 base::FilePath GetTestFilePath(const char* dir, const char* file); |
32 | 34 |
33 // Generate the URL for testing a particular test. | 35 // Generate the URL for testing a particular test. |
34 // HTML for the tests is all located in | 36 // HTML for the tests is all located in |
35 // test_root_directory/dir/<file> | 37 // test_root_directory/dir/<file> |
36 // The returned path is GURL format. | 38 // The returned path is GURL format. |
37 GURL GetTestUrl(const char* dir, const char* file); | 39 GURL GetTestUrl(const char* dir, const char* file); |
38 | 40 |
39 // Navigates the selected tab of |window| to |url|, blocking until the | 41 // Navigates the selected tab of |window| to |url|, blocking until the |
40 // navigation finishes. | 42 // navigation finishes. |
41 void NavigateToURL(Shell* window, const GURL& url); | 43 void NavigateToURL(Shell* window, const GURL& url); |
(...skipping 27 matching lines...) Expand all Loading... |
69 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); | 71 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); |
70 }; | 72 }; |
71 | 73 |
72 #if defined OS_MACOSX | 74 #if defined OS_MACOSX |
73 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); | 75 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); |
74 #endif | 76 #endif |
75 | 77 |
76 } // namespace content | 78 } // namespace content |
77 | 79 |
78 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 80 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
OLD | NEW |