Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Side by Side Diff: chrome/test/ui/ui_test.h

Issue 2280003: Use IPC to wait for download in DownloadTest. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Fix compile error. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/automation/browser_proxy.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // matches the provided xpath. 184 // matches the provided xpath.
185 bool WaitUntilJavaScriptCondition(TabProxy* tab, 185 bool WaitUntilJavaScriptCondition(TabProxy* tab,
186 const std::wstring& frame_xpath, 186 const std::wstring& frame_xpath,
187 const std::wstring& jscript, 187 const std::wstring& jscript,
188 int time_out_ms); 188 int time_out_ms);
189 189
190 // Polls up to kWaitForActionMaxMsec ms to attain a specific tab count. Will 190 // Polls up to kWaitForActionMaxMsec ms to attain a specific tab count. Will
191 // assert that the tab count is valid at the end of the wait. 191 // assert that the tab count is valid at the end of the wait.
192 void WaitUntilTabCount(int tab_count); 192 void WaitUntilTabCount(int tab_count);
193 193
194 // Checks whether the download shelf is visible in the current browser, giving
195 // it a chance to appear (we don't know the exact timing) while finishing as
196 // soon as possible.
197 bool WaitForDownloadShelfVisible(BrowserProxy* browser);
198
199 // Checks whether the download shelf is invisible in the current browser,
200 // giving it a chance to appear (we don't know the exact timing) while
201 // finishing as soon as possible.
202 bool WaitForDownloadShelfInvisible(BrowserProxy* browser);
203
204 private:
205 // Waits for download shelf visibility or invisibility.
206 bool WaitForDownloadShelfVisibilityChange(BrowserProxy* browser,
207 bool wait_for_open);
208
209 public:
210
211 // Waits until the Find window has become fully visible (if |wait_for_open| is 194 // Waits until the Find window has become fully visible (if |wait_for_open| is
212 // true) or fully hidden (if |wait_for_open| is false). This function can time 195 // true) or fully hidden (if |wait_for_open| is false). This function can time
213 // out (return false) if the window doesn't appear within a specific time. 196 // out (return false) if the window doesn't appear within a specific time.
214 bool WaitForFindWindowVisibilityChange(BrowserProxy* browser, 197 bool WaitForFindWindowVisibilityChange(BrowserProxy* browser,
215 bool wait_for_open); 198 bool wait_for_open);
216 199
217 // Waits until the Bookmark bar has stopped animating and become fully visible 200 // Waits until the Bookmark bar has stopped animating and become fully visible
218 // (if |wait_for_open| is true) or fully hidden (if |wait_for_open| is false). 201 // (if |wait_for_open| is true) or fully hidden (if |wait_for_open| is false).
219 // This function can time out (in which case it returns false). 202 // This function can time out (in which case it returns false).
220 bool WaitForBookmarkBarVisibilityChange(BrowserProxy* browser, 203 bool WaitForBookmarkBarVisibilityChange(BrowserProxy* browser,
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 #ifdef UNIT_TEST 631 #ifdef UNIT_TEST
649 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); 632 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr);
650 633
651 template<typename T> 634 template<typename T>
652 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { 635 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) {
653 return out << ptr.get(); 636 return out << ptr.get();
654 } 637 }
655 #endif // UNIT_TEST 638 #endif // UNIT_TEST
656 639
657 #endif // CHROME_TEST_UI_UI_TEST_H_ 640 #endif // CHROME_TEST_UI_UI_TEST_H_
OLDNEW
« no previous file with comments | « chrome/test/automation/browser_proxy.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698