| 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 // Unit tests for the SyncApi. Note that a lot of the underlying | 5 // Unit tests for the SyncApi. Note that a lot of the underlying |
| 6 // functionality is provided by the Syncable layer, which has its own | 6 // functionality is provided by the Syncable layer, which has its own |
| 7 // unit tests. We'll test SyncApi specific things in this harness. | 7 // unit tests. We'll test SyncApi specific things in this harness. |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 std::vector<ModelSafeWorker*> workers; | 762 std::vector<ModelSafeWorker*> workers; |
| 763 ModelSafeRoutingInfo routing_info; | 763 ModelSafeRoutingInfo routing_info; |
| 764 GetModelSafeRoutingInfo(&routing_info); | 764 GetModelSafeRoutingInfo(&routing_info); |
| 765 | 765 |
| 766 // Takes ownership of |sync_notifier_mock_|. | 766 // Takes ownership of |sync_notifier_mock_|. |
| 767 sync_manager_.Init(temp_dir_.path(), | 767 sync_manager_.Init(temp_dir_.path(), |
| 768 WeakHandle<JsEventHandler>(), | 768 WeakHandle<JsEventHandler>(), |
| 769 "bogus", 0, false, | 769 "bogus", 0, false, |
| 770 base::MessageLoopProxy::current(), | 770 base::MessageLoopProxy::current(), |
| 771 new TestHttpPostProviderFactory(), routing_info, workers, | 771 scoped_ptr<HttpPostProviderFactory>( |
| 772 new TestHttpPostProviderFactory()), |
| 773 routing_info, workers, |
| 772 &extensions_activity_monitor_, this, | 774 &extensions_activity_monitor_, this, |
| 773 credentials, | 775 credentials, |
| 774 sync_notifier_mock_, "", | 776 scoped_ptr<SyncNotifier>(sync_notifier_mock_), |
| 777 "", |
| 775 syncer::SyncManager::TEST_IN_MEMORY, | 778 syncer::SyncManager::TEST_IN_MEMORY, |
| 776 &encryptor_, | 779 &encryptor_, |
| 777 &handler_, | 780 &handler_, |
| 778 NULL); | 781 NULL); |
| 779 | 782 |
| 780 EXPECT_TRUE(sync_notifier_observer_); | 783 EXPECT_TRUE(sync_notifier_observer_); |
| 781 EXPECT_TRUE(js_backend_.IsInitialized()); | 784 EXPECT_TRUE(js_backend_.IsInitialized()); |
| 782 | 785 |
| 783 EXPECT_EQ(0, update_enabled_types_call_count_); | 786 EXPECT_EQ(0, update_enabled_types_call_count_); |
| 784 | 787 |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2561 base::Unretained(&retry_task_counter))); | 2564 base::Unretained(&retry_task_counter))); |
| 2562 EXPECT_EQ(0, ready_task_counter.times_called()); | 2565 EXPECT_EQ(0, ready_task_counter.times_called()); |
| 2563 EXPECT_EQ(1, retry_task_counter.times_called()); | 2566 EXPECT_EQ(1, retry_task_counter.times_called()); |
| 2564 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::RECONFIGURATION, | 2567 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::RECONFIGURATION, |
| 2565 params.source); | 2568 params.source); |
| 2566 EXPECT_TRUE(types_to_download.Equals(params.types_to_download)); | 2569 EXPECT_TRUE(types_to_download.Equals(params.types_to_download)); |
| 2567 EXPECT_EQ(new_routing_info, params.routing_info); | 2570 EXPECT_EQ(new_routing_info, params.routing_info); |
| 2568 } | 2571 } |
| 2569 | 2572 |
| 2570 } // namespace | 2573 } // namespace |
| OLD | NEW |