| 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/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Navigates |window| to |url|, blocks until the navigation finishes, and | 63 // Navigates |window| to |url|, blocks until the navigation finishes, and |
| 64 // checks that the navigation did not commit (e.g., due to a crash or | 64 // checks that the navigation did not commit (e.g., due to a crash or |
| 65 // download). | 65 // download). |
| 66 bool NavigateToURLAndExpectNoCommit(Shell* window, const GURL& url); | 66 bool NavigateToURLAndExpectNoCommit(Shell* window, const GURL& url); |
| 67 | 67 |
| 68 // Reloads |window|, blocking until the given number of navigations finishes. | 68 // Reloads |window|, blocking until the given number of navigations finishes. |
| 69 void ReloadBlockUntilNavigationsComplete(Shell* window, | 69 void ReloadBlockUntilNavigationsComplete(Shell* window, |
| 70 int number_of_navigations); | 70 int number_of_navigations); |
| 71 | 71 |
| 72 // Reloads |window| with bypassing cache flag, and blocks until the given number |
| 73 // of navigations finishes. |
| 74 void ReloadBypassingCacheBlockUntilNavigationsComplete( |
| 75 Shell* window, |
| 76 int number_of_navigations); |
| 77 |
| 72 // Wait until an application modal dialog is requested. | 78 // Wait until an application modal dialog is requested. |
| 73 void WaitForAppModalDialog(Shell* window); | 79 void WaitForAppModalDialog(Shell* window); |
| 74 | 80 |
| 75 // Used to wait for a new Shell window to be created. Instantiate this object | 81 // Used to wait for a new Shell window to be created. Instantiate this object |
| 76 // before the operation that will create the window. | 82 // before the operation that will create the window. |
| 77 class ShellAddedObserver { | 83 class ShellAddedObserver { |
| 78 public: | 84 public: |
| 79 ShellAddedObserver(); | 85 ShellAddedObserver(); |
| 80 ~ShellAddedObserver(); | 86 ~ShellAddedObserver(); |
| 81 | 87 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 92 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); | 98 DISALLOW_COPY_AND_ASSIGN(ShellAddedObserver); |
| 93 }; | 99 }; |
| 94 | 100 |
| 95 #if defined OS_MACOSX | 101 #if defined OS_MACOSX |
| 96 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); | 102 void SetWindowBounds(gfx::NativeWindow window, const gfx::Rect& bounds); |
| 97 #endif | 103 #endif |
| 98 | 104 |
| 99 } // namespace content | 105 } // namespace content |
| 100 | 106 |
| 101 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ | 107 #endif // CONTENT_PUBLIC_TEST_CONTENT_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |