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

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

Issue 11052007: Rename ModelType/ObjectIdStateMap to InvalidationMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ModelTypeStateMap types = 181 ModelTypeInvalidationMap invalidation_map =
182 ModelSafeRoutingInfoToStateMap(info, std::string()); 182 ModelSafeRoutingInfoToInvalidationMap(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,
185 invalidation_map),
185 info, workers); 186 info, workers);
186 } 187 }
187 188
188 bool SyncShareAsDelegate( 189 bool SyncShareAsDelegate(
189 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) { 190 SyncSchedulerImpl::SyncSessionJob::SyncSessionJobPurpose purpose) {
190 SyncerStep start; 191 SyncerStep start;
191 SyncerStep end; 192 SyncerStep end;
192 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end); 193 SyncSchedulerImpl::SetSyncerStepsForPurpose(purpose, &start, &end);
193 194
194 session_.reset(MakeSession()); 195 session_.reset(MakeSession());
(...skipping 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after
4692 4693
4693 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { 4694 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) {
4694 Add(mid_id_); 4695 Add(mid_id_);
4695 Add(low_id_); 4696 Add(low_id_);
4696 Add(high_id_); 4697 Add(high_id_);
4697 SyncShareNudge(); 4698 SyncShareNudge();
4698 ExpectLocalOrderIsByServerId(); 4699 ExpectLocalOrderIsByServerId();
4699 } 4700 }
4700 4701
4701 } // namespace syncer 4702 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_whitebox_unittest.cc ('k') | sync/internal_api/debug_info_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698