| 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/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/common/page_type.h" | 10 #include "content/public/common/page_type.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // Navigates |window| to |url|, blocking until the navigation finishes. | 44 // Navigates |window| to |url|, blocking until the navigation finishes. |
| 45 // Returns true if the page was loaded successfully and the last committed | 45 // Returns true if the page was loaded successfully and the last committed |
| 46 // URL matches |url|. | 46 // URL matches |url|. |
| 47 // TODO(alexmos): any tests that use this function and expect successful | 47 // TODO(alexmos): any tests that use this function and expect successful |
| 48 // navigations should do EXPECT_TRUE(NavigateToURL()). | 48 // navigations should do EXPECT_TRUE(NavigateToURL()). |
| 49 bool NavigateToURL(Shell* window, const GURL& url); | 49 bool NavigateToURL(Shell* window, const GURL& url); |
| 50 | 50 |
| 51 void LoadDataWithBaseURL(Shell* window, | 51 void LoadDataWithBaseURL(Shell* window, |
| 52 const GURL& url, | 52 const GURL& url, |
| 53 const std::string data, | 53 const std::string& data, |
| 54 const GURL& base_url); | 54 const GURL& base_url); |
| 55 | 55 |
| 56 // Navigates |window| to |url|, blocking until the given number of navigations | 56 // Navigates |window| to |url|, blocking until the given number of navigations |
| 57 // finishes. | 57 // finishes. |
| 58 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, | 58 void NavigateToURLBlockUntilNavigationsComplete(Shell* window, |
| 59 const GURL& url, | 59 const GURL& url, |
| 60 int number_of_navigations); | 60 int number_of_navigations); |
| 61 | 61 |
| 62 // Navigates |window| to |url|, blocks until the navigation finishes, and | 62 // Navigates |window| to |url|, blocks until the navigation finishes, and |
| 63 // checks that the navigation did not commit (e.g., due to a crash or | 63 // checks that the navigation did not commit (e.g., due to a crash or |
| (...skipping 27 matching lines...) Expand all Loading... |
| 91 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); | 91 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 #if defined OS_MACOSX | 94 #if defined OS_MACOSX |
| 95 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); | 95 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); |
| 96 #endif | 96 #endif |
| 97 | 97 |
| 98 } // namespace content | 98 } // namespace content |
| 99 | 99 |
| 100 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 100 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |