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" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 // The returned path is FilePath format. | 30 // The returned path is FilePath format. |
31 FilePath GetTestFilePath(const char* dir, const char* file); | 31 FilePath GetTestFilePath(const char* dir, const char* file); |
32 | 32 |
33 // Generate the URL for testing a particular test. | 33 // Generate the URL for testing a particular test. |
34 // HTML for the tests is all located in | 34 // HTML for the tests is all located in |
35 // test_root_directory/dir/<file> | 35 // test_root_directory/dir/<file> |
36 // The returned path is GURL format. | 36 // The returned path is GURL format. |
37 GURL GetTestUrl(const char* dir, const char* file); | 37 GURL GetTestUrl(const char* dir, const char* file); |
38 | 38 |
39 // Navigates the selected tab of |window| to |url|, blocking until the | 39 // Navigates the selected tab of |window| to |url|, blocking until the |
40 // navigation finishes. | 40 // navigation finishes by default. If wait_for_navigation is false, |
jam
2012/09/27 18:42:37
you don't need this, you can just do window->Load(
| |
41 void NavigateToURL(Shell* window, const GURL& url); | 41 // then don't block. |
42 void NavigateToURL(Shell* window, | |
43 const GURL& url, | |
44 bool wait_for_navigation = true); | |
42 | 45 |
43 // Navigates the selected tab of |window| to |url|, blocking until the given | 46 // Navigates the selected tab of |window| to |url|, blocking until the given |
44 // number of navigations finishes. | 47 // number of navigations finishes. |
45 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, | 48 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, |
46 const GURL& url, | 49 const GURL& url, |
47 int number_of_navigations); | 50 int number_of_navigations); |
48 | 51 |
49 // Wait until an application modal dialog is requested. | 52 // Wait until an application modal dialog is requested. |
50 void WaitForAppModalDialog(Shell* window); | 53 void WaitForAppModalDialog(Shell* window); |
51 | 54 |
(...skipping 17 matching lines...) Expand all Loading... | |
69 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); | 72 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); |
70 }; | 73 }; |
71 | 74 |
72 #if defined OS_MACOSX | 75 #if defined OS_MACOSX |
73 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); | 76 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); |
74 #endif | 77 #endif |
75 | 78 |
76 } // namespace content | 79 } // namespace content |
77 | 80 |
78 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 81 #endif // CONTENT_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
OLD | NEW |