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

Unified Diff: sync/engine/sync_scheduler_unittest.cc

Issue 93433006: sync: Introduce ModelTypeRegistry and helpers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory leak in tests Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/engine/syncer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_unittest.cc
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index 62aa2c9c2ca30b9b60d5eefab209c4001d40448f..7b0a0d35c03720d0f8723e9b9b18354c21f54b1f 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -130,14 +130,18 @@ class SyncSchedulerTest : public testing::Test {
connection_.reset(new MockConnectionManager(directory(),
&cancelation_signal_));
connection_->SetServerReachable();
+
+ model_type_registry_.reset(new ModelTypeRegistry(workers_, directory()));
+
context_.reset(new SyncSessionContext(
- connection_.get(), directory(), workers_,
+ connection_.get(), directory(),
extensions_activity_.get(),
std::vector<SyncEngineEventListener*>(), NULL, NULL,
+ model_type_registry_.get(),
true, // enable keystore encryption
false, // force enable pre-commit GU avoidance
"fake_invalidator_client_id"));
- context_->set_routing_info(routing_info_);
+ context_->SetRoutingInfo(routing_info_);
context_->set_notifications_enabled(true);
context_->set_account_name("Test");
scheduler_.reset(
@@ -226,6 +230,7 @@ class SyncSchedulerTest : public testing::Test {
TestDirectorySetterUpper dir_maker_;
CancelationSignal cancelation_signal_;
scoped_ptr<MockConnectionManager> connection_;
+ scoped_ptr<ModelTypeRegistry> model_type_registry_;
scoped_ptr<SyncSessionContext> context_;
scoped_ptr<SyncSchedulerImpl> scheduler_;
MockSyncer* syncer_;
@@ -894,7 +899,7 @@ TEST_F(SyncSchedulerTest, ConfigurationMode) {
// TODO(tim): Figure out how to remove this dangerous need to reset
// routing info between mode switches.
- context()->set_routing_info(routing_info());
+ context()->SetRoutingInfo(routing_info());
StartSyncScheduler(SyncScheduler::NORMAL_MODE);
RunLoop();
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/engine/syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698