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

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: Created 8 years, 6 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
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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 GetModelSafeRoutingInfo(&routing_info); 808 GetModelSafeRoutingInfo(&routing_info);
809 809
810 // Takes ownership of |sync_notifier_mock_|. 810 // Takes ownership of |sync_notifier_mock_|.
811 sync_manager_.Init(temp_dir_.path(), 811 sync_manager_.Init(temp_dir_.path(),
812 WeakHandle<JsEventHandler>(), 812 WeakHandle<JsEventHandler>(),
813 "bogus", 0, false, 813 "bogus", 0, false,
814 base::MessageLoopProxy::current(), 814 base::MessageLoopProxy::current(),
815 new TestHttpPostProviderFactory(), routing_info, workers, 815 new TestHttpPostProviderFactory(), routing_info, workers,
816 &extensions_activity_monitor_, this, "bogus", 816 &extensions_activity_monitor_, this, "bogus",
817 credentials, 817 credentials,
818 sync_notifier_mock_, "", 818 sync_notifier_mock_, "", "",
819 true, // enable keystore encryption 819 true, // enable keystore encryption
820 sync_api::SyncManager::TEST_IN_MEMORY, 820 sync_api::SyncManager::TEST_IN_MEMORY,
821 &encryptor_, 821 &encryptor_,
822 &handler_, 822 &handler_,
823 NULL); 823 NULL);
824 824
825 EXPECT_TRUE(sync_notifier_observer_); 825 EXPECT_TRUE(sync_notifier_observer_);
826 EXPECT_TRUE(js_backend_.IsInitialized()); 826 EXPECT_TRUE(js_backend_.IsInitialized());
827 827
828 EXPECT_EQ(0, update_enabled_types_call_count_); 828 EXPECT_EQ(0, update_enabled_types_call_count_);
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 EXPECT_FALSE(ready_task); 2587 EXPECT_FALSE(ready_task);
2588 EXPECT_TRUE(retry_task); 2588 EXPECT_TRUE(retry_task);
2589 browser_sync::ConfigureParams params = sync_manager_.get_config_params(); 2589 browser_sync::ConfigureParams params = sync_manager_.get_config_params();
2590 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::RECONFIGURATION, 2590 EXPECT_EQ(sync_pb::GetUpdatesCallerInfo::RECONFIGURATION,
2591 params.source); 2591 params.source);
2592 EXPECT_TRUE(types_to_config.Equals(params.types_to_config)); 2592 EXPECT_TRUE(types_to_config.Equals(params.types_to_config));
2593 EXPECT_EQ(new_routing_info, params.routing_info); 2593 EXPECT_EQ(new_routing_info, params.routing_info);
2594 } 2594 }
2595 2595
2596 } // namespace browser_sync 2596 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698