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