Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: sync/internal_api/syncapi_unittest.cc

Issue 10540149: [Sync] Persist keystore key across restarts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/test/fake_sync_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // Takes ownership of |sync_notifier_mock_|. 756 // Takes ownership of |sync_notifier_mock_|.
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 "", "", // bootstrap tokens
767 true, // enable keystore encryption 767 true, // enable keystore encryption
768 scoped_ptr<InternalComponentsFactory>(GetFactory()), 768 scoped_ptr<InternalComponentsFactory>(GetFactory()),
769 &encryptor_, 769 &encryptor_,
770 &handler_, 770 &handler_,
771 NULL); 771 NULL);
772 772
773 EXPECT_TRUE(js_backend_.IsInitialized()); 773 EXPECT_TRUE(js_backend_.IsInitialized());
774 774
775 for (ModelSafeRoutingInfo::iterator i = routing_info.begin(); 775 for (ModelSafeRoutingInfo::iterator i = routing_info.begin();
776 i != routing_info.end(); ++i) { 776 i != routing_info.end(); ++i) {
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 2766
2767 // Verify only the non-disabled types remain after cleanup. 2767 // Verify only the non-disabled types remain after cleanup.
2768 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types); 2768 sync_manager_.PurgeDisabledTypes(enabled_types, new_enabled_types);
2769 EXPECT_TRUE(new_enabled_types.Equals( 2769 EXPECT_TRUE(new_enabled_types.Equals(
2770 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types))); 2770 Union(sync_manager_.InitialSyncEndedTypes(), partial_enabled_types)));
2771 EXPECT_TRUE(disabled_types.Equals( 2771 EXPECT_TRUE(disabled_types.Equals(
2772 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All()))); 2772 sync_manager_.GetTypesWithEmptyProgressMarkerToken(ModelTypeSet::All())));
2773 } 2773 }
2774 2774
2775 } // namespace 2775 } // namespace
OLDNEW
« no previous file with comments | « sync/internal_api/sync_manager_impl.cc ('k') | sync/internal_api/test/fake_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698