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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 sync_manager_.Init(temp_dir_.path(), | 757 sync_manager_.Init(temp_dir_.path(), |
758 WeakHandle<JsEventHandler>(), | 758 WeakHandle<JsEventHandler>(), |
759 "bogus", 0, false, | 759 "bogus", 0, false, |
760 base::MessageLoopProxy::current(), | 760 base::MessageLoopProxy::current(), |
761 scoped_ptr<HttpPostProviderFactory>( | 761 scoped_ptr<HttpPostProviderFactory>( |
762 new TestHttpPostProviderFactory()), | 762 new TestHttpPostProviderFactory()), |
763 workers, &extensions_activity_monitor_, this, | 763 workers, &extensions_activity_monitor_, this, |
764 credentials, | 764 credentials, |
765 scoped_ptr<SyncNotifier>(sync_notifier_mock_), | 765 scoped_ptr<SyncNotifier>(sync_notifier_mock_), |
766 "", | 766 "", |
| 767 true, // enable keystore encryption |
767 scoped_ptr<InternalComponentsFactory>(GetFactory()), | 768 scoped_ptr<InternalComponentsFactory>(GetFactory()), |
768 &encryptor_, | 769 &encryptor_, |
769 &handler_, | 770 &handler_, |
770 NULL); | 771 NULL); |
771 | 772 |
772 EXPECT_TRUE(js_backend_.IsInitialized()); | 773 EXPECT_TRUE(js_backend_.IsInitialized()); |
773 | 774 |
774 for (ModelSafeRoutingInfo::iterator i = routing_info.begin(); | 775 for (ModelSafeRoutingInfo::iterator i = routing_info.begin(); |
775 i != routing_info.end(); ++i) { | 776 i != routing_info.end(); ++i) { |
776 type_roots_[i->first] = MakeServerNodeForType( | 777 type_roots_[i->first] = MakeServerNodeForType( |
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 | 2766 |
2766 // Verify only the non-disabled types remain after cleanup. | 2767 // Verify only the non-disabled types remain after cleanup. |
2767 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); | 2768 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); |
2768 EXPECT_TRUE(new_enabled_types.Equals( | 2769 EXPECT_TRUE(new_enabled_types.Equals( |
2769 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); | 2770 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); |
2770 EXPECT_TRUE(disabled_types.Equals( | 2771 EXPECT_TRUE(disabled_types.Equals( |
2771 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); | 2772 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); |
2772 } | 2773 } |
2773 | 2774 |
2774 } // namespace | 2775 } // namespace |
OLD | NEW |