| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_TEST_UI_UI_TEST_H_ | 5 #ifndef CHROME_TEST_UI_UI_TEST_H_ |
| 6 #define CHROME_TEST_UI_UI_TEST_H_ | 6 #define CHROME_TEST_UI_UI_TEST_H_ |
| 7 | 7 |
| 8 // This file provides a common base for running UI unit tests, which operate | 8 // This file provides a common base for running UI unit tests, which operate |
| 9 // the entire browser application in a separate process for holistic | 9 // the entire browser application in a separate process for holistic |
| 10 // functional testing. | 10 // functional testing. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Polls up to kWaitForActionMaxMsec ms to attain a specific tab count. Will | 124 // Polls up to kWaitForActionMaxMsec ms to attain a specific tab count. Will |
| 125 // assert that the tab count is valid at the end of the wait. | 125 // assert that the tab count is valid at the end of the wait. |
| 126 void WaitUntilTabCount(int tab_count); | 126 void WaitUntilTabCount(int tab_count); |
| 127 | 127 |
| 128 // Checks whether the download shelf is visible in the current tab, giving it | 128 // Checks whether the download shelf is visible in the current tab, giving it |
| 129 // a chance to appear (we don't know the exact timing) while finishing as soon | 129 // a chance to appear (we don't know the exact timing) while finishing as soon |
| 130 // as possible. | 130 // as possible. |
| 131 bool WaitForDownloadShelfVisible(TabProxy* tab); | 131 bool WaitForDownloadShelfVisible(TabProxy* tab); |
| 132 | 132 |
| 133 // Waits until the Find window has become fully visible (and stopped | 133 // Waits until the Find window has become fully visible (if |wait_for_open| is |
| 134 // animating) in the specified tab. This function can time out (return false) | 134 // true) or fully hidden (if |wait_for_open| is false). This function can time |
| 135 // if the window doesn't appear within a specific time. | 135 // out (return false) if the window doesn't appear within a specific time. |
| 136 bool WaitForFindWindowFullyVisible(TabProxy* tab); | 136 bool WaitForFindWindowVisibilityChange(TabProxy* tab, |
| 137 bool wait_for_open); |
| 137 | 138 |
| 138 // Waits until the Bookmark bar has stopped animating and become fully visible | 139 // Waits until the Bookmark bar has stopped animating and become fully visible |
| 139 // (if |wait_for_open| is true) or fully hidden (if |wait_for_open| is false). | 140 // (if |wait_for_open| is true) or fully hidden (if |wait_for_open| is false). |
| 140 // This function can time out (in which case it returns false). | 141 // This function can time out (in which case it returns false). |
| 141 bool WaitForBookmarkBarVisibilityChange(BrowserProxy* browser, | 142 bool WaitForBookmarkBarVisibilityChange(BrowserProxy* browser, |
| 142 bool wait_for_open); | 143 bool wait_for_open); |
| 143 | 144 |
| 144 // Closes the specified browser. Returns true if the browser was closed. | 145 // Closes the specified browser. Returns true if the browser was closed. |
| 145 // This call is blocking. |application_closed| is set to true if this was | 146 // This call is blocking. |application_closed| is set to true if this was |
| 146 // the last browser window (and therefore as a result of it closing the | 147 // the last browser window (and therefore as a result of it closing the |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 #ifdef UNIT_TEST | 409 #ifdef UNIT_TEST |
| 409 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); | 410 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); |
| 410 | 411 |
| 411 template<typename T> | 412 template<typename T> |
| 412 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { | 413 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { |
| 413 return out << ptr.get(); | 414 return out << ptr.get(); |
| 414 } | 415 } |
| 415 #endif // UNIT_TEST | 416 #endif // UNIT_TEST |
| 416 | 417 |
| 417 #endif // CHROME_TEST_UI_UI_TEST_H_ | 418 #endif // CHROME_TEST_UI_UI_TEST_H_ |
| OLD | NEW |