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

Side by Side Diff: sync/engine/sync_scheduler_unittest.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 unified diff | Download patch
OLDNEW
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 scheduler_.reset( 126 scheduler_.reset(
127 new SyncScheduler("TestSyncScheduler", context(), syncer_)); 127 new SyncScheduler("TestSyncScheduler", context(), syncer_));
128 } 128 }
129 129
130 SyncScheduler* scheduler() { return scheduler_.get(); } 130 SyncScheduler* scheduler() { return scheduler_.get(); }
131 MockSyncer* syncer() { return syncer_; } 131 MockSyncer* syncer() { return syncer_; }
132 MockDelayProvider* delay() { return delay_; } 132 MockDelayProvider* delay() { return delay_; }
133 MockConnectionManager* connection() { return connection_.get(); } 133 MockConnectionManager* connection() { return connection_.get(); }
134 TimeDelta zero() { return TimeDelta::FromSeconds(0); } 134 TimeDelta zero() { return TimeDelta::FromSeconds(0); }
135 TimeDelta timeout() { 135 TimeDelta timeout() {
136 return TimeDelta::FromMilliseconds(TestTimeouts::action_timeout_ms()); 136 return TestTimeouts::action_timeout();
137 } 137 }
138 138
139 virtual void TearDown() { 139 virtual void TearDown() {
140 PumpLoop(); 140 PumpLoop();
141 scheduler_.reset(); 141 scheduler_.reset();
142 PumpLoop(); 142 PumpLoop();
143 dir_maker_.TearDown(); 143 dir_maker_.TearDown();
144 } 144 }
145 145
146 void AnalyzePollRun(const SyncShareRecords& records, size_t min_num_samples, 146 void AnalyzePollRun(const SyncShareRecords& records, size_t min_num_samples,
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 PumpLoop(); 1178 PumpLoop();
1179 // Pump again to run job. 1179 // Pump again to run job.
1180 PumpLoop(); 1180 PumpLoop();
1181 1181
1182 StopSyncScheduler(); 1182 StopSyncScheduler();
1183 1183
1184 EXPECT_TRUE(expected == context()->previous_session_routing_info()); 1184 EXPECT_TRUE(expected == context()->previous_session_routing_info());
1185 } 1185 }
1186 1186
1187 } // namespace syncer 1187 } // namespace syncer
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | sync/internal_api/syncapi_server_connection_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698