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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 WeakHandle<JsEventHandler>(), | 768 WeakHandle<JsEventHandler>(), |
769 "bogus", 0, false, | 769 "bogus", 0, false, |
770 base::MessageLoopProxy::current(), | 770 base::MessageLoopProxy::current(), |
771 scoped_ptr<HttpPostProviderFactory>( | 771 scoped_ptr<HttpPostProviderFactory>( |
772 new TestHttpPostProviderFactory()), | 772 new TestHttpPostProviderFactory()), |
773 routing_info, workers, | 773 routing_info, workers, |
774 &extensions_activity_monitor_, this, | 774 &extensions_activity_monitor_, this, |
775 credentials, | 775 credentials, |
776 scoped_ptr<SyncNotifier>(sync_notifier_mock_), | 776 scoped_ptr<SyncNotifier>(sync_notifier_mock_), |
777 "", | 777 "", |
| 778 true, // enable keystore encryption |
778 syncer::SyncManager::TEST_IN_MEMORY, | 779 syncer::SyncManager::TEST_IN_MEMORY, |
779 &encryptor_, | 780 &encryptor_, |
780 &handler_, | 781 &handler_, |
781 NULL); | 782 NULL); |
782 | 783 |
783 EXPECT_TRUE(sync_notifier_observer_); | 784 EXPECT_TRUE(sync_notifier_observer_); |
784 EXPECT_TRUE(js_backend_.IsInitialized()); | 785 EXPECT_TRUE(js_backend_.IsInitialized()); |
785 | 786 |
786 EXPECT_EQ(0, update_enabled_types_call_count_); | 787 EXPECT_EQ(0, update_enabled_types_call_count_); |
787 | 788 |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 // Ensure only bookmarks and nigori lost their progress marker. Preferences | 2607 // Ensure only bookmarks and nigori lost their progress marker. Preferences |
2607 // should still have it. | 2608 // should still have it. |
2608 partial_types = | 2609 partial_types = |
2609 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()); | 2610 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()); |
2610 EXPECT_TRUE(partial_types.Has(NIGORI)); | 2611 EXPECT_TRUE(partial_types.Has(NIGORI)); |
2611 EXPECT_TRUE(partial_types.Has(BOOKMARKS)); | 2612 EXPECT_TRUE(partial_types.Has(BOOKMARKS)); |
2612 EXPECT_FALSE(partial_types.Has(PREFERENCES)); | 2613 EXPECT_FALSE(partial_types.Has(PREFERENCES)); |
2613 } | 2614 } |
2614 | 2615 |
2615 } // namespace | 2616 } // namespace |
OLD | NEW |