OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 GetModelSafeRoutingInfo(&routing_info); | 222 GetModelSafeRoutingInfo(&routing_info); |
223 GetWorkers(&workers); | 223 GetWorkers(&workers); |
224 | 224 |
225 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 225 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
226 | 226 |
227 context_.reset( | 227 context_.reset( |
228 new SyncSessionContext( | 228 new SyncSessionContext( |
229 mock_server_.get(), directory(), workers, | 229 mock_server_.get(), directory(), workers, |
230 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), | 230 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), |
231 listeners, NULL, &traffic_recorder_, | 231 listeners, NULL, &traffic_recorder_, |
232 true /* enable keystore encryption */)); | 232 true, // enable keystore encryption |
| 233 "fake_invalidator_client_id")); |
233 context_->set_routing_info(routing_info); | 234 context_->set_routing_info(routing_info); |
234 syncer_ = new Syncer(); | 235 syncer_ = new Syncer(); |
235 session_.reset(MakeSession()); | 236 session_.reset(MakeSession()); |
236 | 237 |
237 syncable::ReadTransaction trans(FROM_HERE, directory()); | 238 syncable::ReadTransaction trans(FROM_HERE, directory()); |
238 syncable::Directory::ChildHandles children; | 239 syncable::Directory::ChildHandles children; |
239 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); | 240 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); |
240 ASSERT_EQ(0u, children.size()); | 241 ASSERT_EQ(0u, children.size()); |
241 saw_syncer_event_ = false; | 242 saw_syncer_event_ = false; |
242 root_id_ = TestIdFactory::root(); | 243 root_id_ = TestIdFactory::root(); |
(...skipping 4511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4754 | 4755 |
4755 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { | 4756 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { |
4756 Add(mid_id_); | 4757 Add(mid_id_); |
4757 Add(low_id_); | 4758 Add(low_id_); |
4758 Add(high_id_); | 4759 Add(high_id_); |
4759 SyncShareNudge(); | 4760 SyncShareNudge(); |
4760 ExpectLocalOrderIsByServerId(); | 4761 ExpectLocalOrderIsByServerId(); |
4761 } | 4762 } |
4762 | 4763 |
4763 } // namespace syncer | 4764 } // namespace syncer |
OLD | NEW |