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

Side by Side Diff: sync/engine/syncer_unittest.cc

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
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 // 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 CHECK(false) << "Handling unknown error type in unit tests!!"; 170 CHECK(false) << "Handling unknown error type in unit tests!!";
171 } 171 }
172 saw_syncer_event_ = true; 172 saw_syncer_event_ = true;
173 } 173 }
174 174
175 SyncSession* MakeSession() { 175 SyncSession* MakeSession() {
176 ModelSafeRoutingInfo info; 176 ModelSafeRoutingInfo info;
177 std::vector<ModelSafeWorker*> workers; 177 std::vector<ModelSafeWorker*> workers;
178 GetModelSafeRoutingInfo(&info); 178 GetModelSafeRoutingInfo(&info);
179 GetWorkers(&workers); 179 GetWorkers(&workers);
180 ModelTypePayloadMap types = 180 ModelTypeStateMap types =
181 ModelSafeRoutingInfoToPayloadMap(info, std::string()); 181 ModelSafeRoutingInfoToStateMap(info, std::string());
182 return new SyncSession(context_.get(), this, 182 return new SyncSession(context_.get(), this,
183 sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, types), 183 sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, types),
184 info, workers); 184 info, workers);
185 } 185 }
186 186
187 bool SyncShareAsDelegate( 187 bool SyncShareAsDelegate(
188 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) { 188 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) {
189 SyncerStep start; 189 SyncerStep start;
190 SyncerStep end; 190 SyncerStep end;
191 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end); 191 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end);
(...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4857 4857
4858 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { 4858 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) {
4859 Add(mid_id_); 4859 Add(mid_id_);
4860 Add(low_id_); 4860 Add(low_id_);
4861 Add(high_id_); 4861 Add(high_id_);
4862 SyncShareNudge(); 4862 SyncShareNudge();
4863 ExpectLocalOrderIsByServerId(); 4863 ExpectLocalOrderIsByServerId();
4864 } 4864 }
4865 4865
4866 } // namespace syncer 4866 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698