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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 listeners.push_back(this); | 227 listeners.push_back(this); |
228 | 228 |
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 context_.reset( | 235 context_.reset( |
236 new SyncSessionContext( | 236 new SyncSessionContext( |
237 mock_server_.get(), directory(), routing_info, workers, | 237 mock_server_.get(), directory(), workers, |
238 &extensions_activity_monitor_, listeners, NULL, | 238 &extensions_activity_monitor_, listeners, NULL, |
239 &traffic_recorder_)); | 239 &traffic_recorder_)); |
| 240 context_->set_routing_info(routing_info); |
240 ASSERT_FALSE(context_->resolver()); | 241 ASSERT_FALSE(context_->resolver()); |
241 syncer_ = new Syncer(); | 242 syncer_ = new Syncer(); |
242 session_.reset(MakeSession()); | 243 session_.reset(MakeSession()); |
243 | 244 |
244 ReadTransaction trans(FROM_HERE, directory()); | 245 ReadTransaction trans(FROM_HERE, directory()); |
245 syncable::Directory::ChildHandles children; | 246 syncable::Directory::ChildHandles children; |
246 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); | 247 directory()->GetChildHandlesById(&trans, trans.root_id(), &children); |
247 ASSERT_EQ(0u, children.size()); | 248 ASSERT_EQ(0u, children.size()); |
248 saw_syncer_event_ = false; | 249 saw_syncer_event_ = false; |
249 root_id_ = TestIdFactory::root(); | 250 root_id_ = TestIdFactory::root(); |
(...skipping 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4822 | 4823 |
4823 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { | 4824 TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { |
4824 Add(mid_id_); | 4825 Add(mid_id_); |
4825 Add(low_id_); | 4826 Add(low_id_); |
4826 Add(high_id_); | 4827 Add(high_id_); |
4827 SyncShareNudge(); | 4828 SyncShareNudge(); |
4828 ExpectLocalOrderIsByServerId(); | 4829 ExpectLocalOrderIsByServerId(); |
4829 } | 4830 } |
4830 | 4831 |
4831 } // namespace browser_sync | 4832 } // namespace browser_sync |
OLD | NEW |