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

Unified Diff: chrome/test/automation/browser_proxy.cc

Issue 11377: Changes tab restore service to handle restoring closed windows as a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/automation/browser_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/browser_proxy.cc
===================================================================
--- chrome/test/automation/browser_proxy.cc (revision 5928)
+++ chrome/test/automation/browser_proxy.cc (working copy)
@@ -286,6 +286,24 @@
return false;
}
+bool BrowserProxy::WaitForTabCountToBecome(int count, int wait_timeout) {
+ const TimeTicks start = TimeTicks::Now();
+ const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
+ while (TimeTicks::Now() - start < timeout) {
+ Sleep(automation::kSleepTime);
+ bool is_timeout;
+ int new_count;
+ bool succeeded = GetTabCountWithTimeout(&new_count, wait_timeout,
+ &is_timeout);
+ if (!succeeded)
+ return false;
+ if (count == new_count)
+ return true;
+ }
+ // If we get here, the tab count doesn't match.
+ return false;
+}
+
bool BrowserProxy::WaitForTabToBecomeActive(int tab,
int wait_timeout) {
const TimeTicks start = TimeTicks::Now();
« no previous file with comments | « chrome/test/automation/browser_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698