| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 EXPECT_FALSE(js_backend_.IsInitialized()); | 823 EXPECT_FALSE(js_backend_.IsInitialized()); |
| 824 | 824 |
| 825 std::vector<ModelSafeWorker*> workers; | 825 std::vector<ModelSafeWorker*> workers; |
| 826 ModelSafeRoutingInfo routing_info; | 826 ModelSafeRoutingInfo routing_info; |
| 827 GetModelSafeRoutingInfo(&routing_info); | 827 GetModelSafeRoutingInfo(&routing_info); |
| 828 | 828 |
| 829 // Takes ownership of |fake_invalidator_|. | 829 // Takes ownership of |fake_invalidator_|. |
| 830 sync_manager_.Init(temp_dir_.path(), | 830 sync_manager_.Init(temp_dir_.path(), |
| 831 WeakHandle<JsEventHandler>(), | 831 WeakHandle<JsEventHandler>(), |
| 832 "bogus", 0, false, | 832 "bogus", 0, false, |
| 833 base::MessageLoopProxy::current(), | |
| 834 scoped_ptr<HttpPostProviderFactory>( | 833 scoped_ptr<HttpPostProviderFactory>( |
| 835 new TestHttpPostProviderFactory()), | 834 new TestHttpPostProviderFactory()), |
| 836 workers, &extensions_activity_monitor_, this, | 835 workers, &extensions_activity_monitor_, this, |
| 837 credentials, | 836 credentials, |
| 838 scoped_ptr<Invalidator>(fake_invalidator_), | 837 scoped_ptr<Invalidator>(fake_invalidator_), |
| 839 "", "", // bootstrap tokens | 838 "", "", // bootstrap tokens |
| 840 scoped_ptr<InternalComponentsFactory>(GetFactory()), | 839 scoped_ptr<InternalComponentsFactory>(GetFactory()), |
| 841 &encryptor_, | 840 &encryptor_, |
| 842 &handler_, | 841 &handler_, |
| 843 NULL); | 842 NULL); |
| (...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3006 | 3005 |
| 3007 // Verify only the non-disabled types remain after cleanup. | 3006 // Verify only the non-disabled types remain after cleanup. |
| 3008 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); | 3007 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); |
| 3009 EXPECT_TRUE(new_enabled_types.Equals( | 3008 EXPECT_TRUE(new_enabled_types.Equals( |
| 3010 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); | 3009 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); |
| 3011 EXPECT_TRUE(disabled_types.Equals( | 3010 EXPECT_TRUE(disabled_types.Equals( |
| 3012 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); | 3011 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); |
| 3013 } | 3012 } |
| 3014 | 3013 |
| 3015 } // namespace | 3014 } // namespace |
| OLD | NEW |