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

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

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ModelSafeRoutingInfo routing_info; 229 ModelSafeRoutingInfo routing_info;
230 std::vector<ModelSafeWorker*> workers; 230 std::vector<ModelSafeWorker*> workers;
231 231
232 GetModelSafeRoutingInfo(&routing_info); 232 GetModelSafeRoutingInfo(&routing_info);
233 GetWorkers(&workers); 233 GetWorkers(&workers);
234 234
235 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 235 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
236 236
237 context_.reset( 237 context_.reset(
238 new SyncSessionContext( 238 new SyncSessionContext(
239 mock_server_.get(), directory(), routing_info, workers, 239 mock_server_.get(), directory(), workers,
240 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), 240 &extensions_activity_monitor_, throttled_data_type_tracker_.get(),
241 listeners, NULL, &traffic_recorder_)); 241 listeners, NULL, &traffic_recorder_));
242 context_->set_routing_info(routing_info);
242 ASSERT_FALSE(context_->resolver()); 243 ASSERT_FALSE(context_->resolver());
243 syncer_ = new Syncer(); 244 syncer_ = new Syncer();
244 session_.reset(MakeSession()); 245 session_.reset(MakeSession());
245 246
246 syncable::ReadTransaction trans(FROM_HERE, directory()); 247 syncable::ReadTransaction trans(FROM_HERE, directory());
247 syncable::Directory::ChildHandles children; 248 syncable::Directory::ChildHandles children;
248 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); 249 directory()->GetChildHandlesById(&trans, trans.root_id(), &children);
249 ASSERT_EQ(0u, children.size()); 250 ASSERT_EQ(0u, children.size());
250 saw_syncer_event_ = false; 251 saw_syncer_event_ = false;
251 root_id_ = TestIdFactory::root(); 252 root_id_ = TestIdFactory::root();
(...skipping 4571 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 4824
4824 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { 4825 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) {
4825 Add(mid_id_); 4826 Add(mid_id_);
4826 Add(low_id_); 4827 Add(low_id_);
4827 Add(high_id_); 4828 Add(high_id_);
4828 SyncShareNudge(); 4829 SyncShareNudge();
4829 ExpectLocalOrderIsByServerId(); 4830 ExpectLocalOrderIsByServerId();
4830 } 4831 }
4831 4832
4832 } // namespace syncer 4833 } // 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