| 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 // Syncer unit tests. Unfortunately a lot of these tests | 5 // Syncer unit tests. Unfortunately a lot of these tests |
| 6 // are outdated and need to be reworked and updated. | 6 // are outdated and need to be reworked and updated. |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 CHECK(false) << "Handling unknown error type in unit tests!!"; | 171 CHECK(false) << "Handling unknown error type in unit tests!!"; |
| 172 } | 172 } |
| 173 saw_syncer_event_ = true; | 173 saw_syncer_event_ = true; |
| 174 } | 174 } |
| 175 | 175 |
| 176 SyncSession* MakeSession() { | 176 SyncSession* MakeSession() { |
| 177 ModelSafeRoutingInfo info; | 177 ModelSafeRoutingInfo info; |
| 178 std::vector<ModelSafeWorker*> workers; | 178 std::vector<ModelSafeWorker*> workers; |
| 179 GetModelSafeRoutingInfo(&info); | 179 GetModelSafeRoutingInfo(&info); |
| 180 GetWorkers(&workers); | 180 GetWorkers(&workers); |
| 181 ModelTypePayloadMap types = | 181 ModelTypeStateMap types = |
| 182 ModelSafeRoutingInfoToPayloadMap(info, std::string()); | 182 ModelSafeRoutingInfoToStateMap(info, std::string()); |
| 183 return new SyncSession(context_.get(), this, | 183 return new SyncSession(context_.get(), this, |
| 184 sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, types), | 184 sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, types), |
| 185 info, workers); | 185 info, workers); |
| 186 } | 186 } |
| 187 | 187 |
| 188 bool SyncShareAsDelegate( | 188 bool SyncShareAsDelegate( |
| 189 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) { | 189 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) { |
| 190 SyncerStep start; | 190 SyncerStep start; |
| 191 SyncerStep end; | 191 SyncerStep end; |
| 192 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end); | 192 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end); |
| (...skipping 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4781 | 4781 |
| 4782 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { | 4782 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { |
| 4783 Add(mid_id_); | 4783 Add(mid_id_); |
| 4784 Add(low_id_); | 4784 Add(low_id_); |
| 4785 Add(high_id_); | 4785 Add(high_id_); |
| 4786 SyncShareNudge(); | 4786 SyncShareNudge(); |
| 4787 ExpectLocalOrderIsByServerId(); | 4787 ExpectLocalOrderIsByServerId(); |
| 4788 } | 4788 } |
| 4789 | 4789 |
| 4790 } // namespace syncer | 4790 } // namespace syncer |
| OLD | NEW |