OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |