| 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 EXPECT_FALSE(js_backend_.IsInitialized()); | 747 EXPECT_FALSE(js_backend_.IsInitialized()); |
| 748 | 748 |
| 749 std::vector<ModelSafeWorker*> workers; | 749 std::vector<ModelSafeWorker*> workers; |
| 750 ModelSafeRoutingInfo routing_info; | 750 ModelSafeRoutingInfo routing_info; |
| 751 GetModelSafeRoutingInfo(&routing_info); | 751 GetModelSafeRoutingInfo(&routing_info); |
| 752 | 752 |
| 753 // Takes ownership of |fake_invalidator_|. | 753 // Takes ownership of |fake_invalidator_|. |
| 754 sync_manager_.Init(temp_dir_.path(), | 754 sync_manager_.Init(temp_dir_.path(), |
| 755 WeakHandle<JsEventHandler>(), | 755 WeakHandle<JsEventHandler>(), |
| 756 "bogus", 0, false, | 756 "bogus", 0, false, |
| 757 base::MessageLoopProxy::current(), | |
| 758 scoped_ptr<HttpPostProviderFactory>( | 757 scoped_ptr<HttpPostProviderFactory>( |
| 759 new TestHttpPostProviderFactory()), | 758 new TestHttpPostProviderFactory()), |
| 760 workers, &extensions_activity_monitor_, this, | 759 workers, &extensions_activity_monitor_, this, |
| 761 credentials, | 760 credentials, |
| 762 scoped_ptr<Invalidator>(fake_invalidator_), | 761 scoped_ptr<Invalidator>(fake_invalidator_), |
| 763 "", "", // bootstrap tokens | 762 "", "", // bootstrap tokens |
| 764 scoped_ptr<InternalComponentsFactory>(GetFactory()), | 763 scoped_ptr<InternalComponentsFactory>(GetFactory()), |
| 765 &encryptor_, | 764 &encryptor_, |
| 766 &handler_, | 765 &handler_, |
| 767 NULL); | 766 NULL); |
| (...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2930 | 2929 |
| 2931 // Verify only the non-disabled types remain after cleanup. | 2930 // Verify only the non-disabled types remain after cleanup. |
| 2932 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); | 2931 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); |
| 2933 EXPECT_TRUE(new_enabled_types.Equals( | 2932 EXPECT_TRUE(new_enabled_types.Equals( |
| 2934 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); | 2933 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); |
| 2935 EXPECT_TRUE(disabled_types.Equals( | 2934 EXPECT_TRUE(disabled_types.Equals( |
| 2936 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); | 2935 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); |
| 2937 } | 2936 } |
| 2938 | 2937 |
| 2939 } // namespace | 2938 } // namespace |
| OLD | NEW |