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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 scheduler_.reset( | 116 scheduler_.reset( |
117 new SyncScheduler("TestSyncScheduler", context(), syncer_)); | 117 new SyncScheduler("TestSyncScheduler", context(), syncer_)); |
118 } | 118 } |
119 | 119 |
120 SyncScheduler* scheduler() { return scheduler_.get(); } | 120 SyncScheduler* scheduler() { return scheduler_.get(); } |
121 MockSyncer* syncer() { return syncer_; } | 121 MockSyncer* syncer() { return syncer_; } |
122 MockDelayProvider* delay() { return delay_; } | 122 MockDelayProvider* delay() { return delay_; } |
123 MockConnectionManager* connection() { return connection_.get(); } | 123 MockConnectionManager* connection() { return connection_.get(); } |
124 TimeDelta zero() { return TimeDelta::FromSeconds(0); } | 124 TimeDelta zero() { return TimeDelta::FromSeconds(0); } |
125 TimeDelta timeout() { | 125 TimeDelta timeout() { |
126 return TimeDelta::FromMilliseconds(TestTimeouts::action_timeout_ms()); | 126 return TestTimeouts::action_timeout(); |
127 } | 127 } |
128 | 128 |
129 virtual void TearDown() { | 129 virtual void TearDown() { |
130 PumpLoop(); | 130 PumpLoop(); |
131 scheduler_.reset(); | 131 scheduler_.reset(); |
132 PumpLoop(); | 132 PumpLoop(); |
133 dir_maker_.TearDown(); | 133 dir_maker_.TearDown(); |
134 } | 134 } |
135 | 135 |
136 void AnalyzePollRun(const SyncShareRecords& records, size_t min_num_samples, | 136 void AnalyzePollRun(const SyncShareRecords& records, size_t min_num_samples, |
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 PumpLoop(); | 1133 PumpLoop(); |
1134 // Pump again to run job. | 1134 // Pump again to run job. |
1135 PumpLoop(); | 1135 PumpLoop(); |
1136 | 1136 |
1137 StopSyncScheduler(); | 1137 StopSyncScheduler(); |
1138 | 1138 |
1139 EXPECT_TRUE(expected == context()->previous_session_routing_info()); | 1139 EXPECT_TRUE(expected == context()->previous_session_routing_info()); |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace syncer | 1142 } // namespace syncer |
OLD | NEW |