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

Unified Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 10689157: Switch to TimeDelta interfaces for TestTimeouts in sync code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix error messaging again. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index fe09c8550e1320b1c41884cbf5f09918c23ef43d..25427181625e4e7b4ac72c4c8d2b7764c6c4d09d 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -515,7 +515,7 @@ bool SyncTest::SetUpLocalTestServer() {
if (!base::LaunchProcess(server_cmdline, options, &test_server_handle_))
LOG(ERROR) << "Could not launch local test server.";
- const int kMaxWaitTime = TestTimeouts::action_max_timeout_ms();
+ const base::TimeDelta kMaxWaitTime = TestTimeouts::action_max_timeout();
const int kNumIntervals = 15;
if (WaitForTestServerToStart(kMaxWaitTime, kNumIntervals)) {
DVLOG(1) << "Started local test server at "
@@ -547,12 +547,11 @@ bool SyncTest::TearDownLocalTestServer() {
return true;
}
-bool SyncTest::WaitForTestServerToStart(int time_ms, int intervals) {
+bool SyncTest::WaitForTestServerToStart(base::TimeDelta wait, int intervals) {
for (int i = 0; i < intervals; ++i) {
if (IsTestServerRunning())
return true;
- base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
- time_ms / intervals));
+ base::PlatformThread::Sleep(wait / intervals);
}
return false;
}
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698