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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 226 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
227 | 227 |
228 context_.reset( | 228 context_.reset( |
229 new SyncSessionContext( | 229 new SyncSessionContext( |
230 mock_server_.get(), directory(), workers, | 230 mock_server_.get(), directory(), workers, |
231 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), | 231 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), |
232 listeners, NULL, &traffic_recorder_, | 232 listeners, NULL, &traffic_recorder_, |
233 true /* enable keystore encryption */)); | 233 true /* enable keystore encryption */)); |
234 context_->set_routing_info(routing_info); | 234 context_->set_routing_info(routing_info); |
235 ASSERT_FALSE(context_->resolver()); | |
236 syncer_ = new Syncer(); | 235 syncer_ = new Syncer(); |
237 session_.reset(MakeSession()); | 236 session_.reset(MakeSession()); |
238 | 237 |
239 syncable::ReadTransaction trans(FROM_HERE, directory()); | 238 syncable::ReadTransaction trans(FROM_HERE, directory()); |
240 syncable::Directory::ChildHandles children; | 239 syncable::Directory::ChildHandles children; |
241 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); | 240 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); |
242 ASSERT_EQ(0u, children.size()); | 241 ASSERT_EQ(0u, children.size()); |
243 saw_syncer_event_ = false; | 242 saw_syncer_event_ = false; |
244 root_id_ = TestIdFactory::root(); | 243 root_id_ = TestIdFactory::root(); |
245 parent_id_ = ids_.MakeServer("parent id"); | 244 parent_id_ = ids_.MakeServer("parent id"); |
(...skipping 4468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4714 | 4713 |
4715 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { | 4714 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { |
4716 Add(mid_id_); | 4715 Add(mid_id_); |
4717 Add(low_id_); | 4716 Add(low_id_); |
4718 Add(high_id_); | 4717 Add(high_id_); |
4719 SyncShareNudge(); | 4718 SyncShareNudge(); |
4720 ExpectLocalOrderIsByServerId(); | 4719 ExpectLocalOrderIsByServerId(); |
4721 } | 4720 } |
4722 | 4721 |
4723 } // namespace syncer | 4722 } // namespace syncer |
OLD | NEW |