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_CONTENT_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Generate the URL for testing a particular test. | 36 // Generate the URL for testing a particular test. |
37 // HTML for the tests is all located in | 37 // HTML for the tests is all located in |
38 // test_root_directory/dir/<file> | 38 // test_root_directory/dir/<file> |
39 // The returned path is GURL format. | 39 // The returned path is GURL format. |
40 GURL GetTestUrl(const char* dir, const char* file); | 40 GURL GetTestUrl(const char* dir, const char* file); |
41 | 41 |
42 // Navigates the selected tab of |window| to |url|, blocking until the | 42 // Navigates the selected tab of |window| to |url|, blocking until the |
43 // navigation finishes. | 43 // navigation finishes. |
44 void NavigateToURL(Shell* window, const GURL& url); | 44 void NavigateToURL(Shell* window, const GURL& url); |
| 45 void LoadDataWithBaseURL(Shell* window, |
| 46 const GURL& url, |
| 47 const std::string data, |
| 48 const GURL& base_url); |
45 | 49 |
46 // Navigates the selected tab of |window| to |url|, blocking until the given | 50 // Navigates the selected tab of |window| to |url|, blocking until the given |
47 // number of navigations finishes. | 51 // number of navigations finishes. |
48 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, | 52 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, |
49 const GURL& url, | 53 const GURL& url, |
50 int number_of_navigations); | 54 int number_of_navigations); |
51 | 55 |
52 // Wait until an application modal dialog is requested. | 56 // Wait until an application modal dialog is requested. |
53 void WaitForAppModalDialog(Shell* window); | 57 void WaitForAppModalDialog(Shell* window); |
54 | 58 |
(...skipping 17 matching lines...) Expand all Loading... |
72 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); | 76 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); |
73 }; | 77 }; |
74 | 78 |
75 #if defined OS_MACOSX | 79 #if defined OS_MACOSX |
76 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); | 80 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); |
77 #endif | 81 #endif |
78 | 82 |
79 } // namespace content | 83 } // namespace content |
80 | 84 |
81 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 85 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
OLD | NEW |