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

Unified Diff: chrome/browser/sync/glue/sync_backend_registrar_unittest.cc

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 | « chrome/browser/sync/glue/sync_backend_registrar.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
index 1950ed9343f81bc5de9a73ea6e9ab97ffe7d5afa..72158cbca8112f8dde5db5610429e9ed8e0c5778 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
@@ -74,7 +74,8 @@ class SyncBackendRegistrarTest : public testing::Test {
TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) {
TestingProfile profile;
- SyncBackendRegistrar registrar(ModelTypeSet(), "test", &profile, &loop_);
+ SyncBackendRegistrar registrar("test", &profile, &loop_);
+ registrar.SetInitialTypes(ModelTypeSet());
EXPECT_FALSE(registrar.IsNigoriEnabled());
{
std::vector<syncer::ModelSafeWorker*> workers;
@@ -90,7 +91,8 @@ TEST_F(SyncBackendRegistrarTest, ConstructorEmpty) {
TEST_F(SyncBackendRegistrarTest, ConstructorNonEmpty) {
TestingProfile profile;
const ModelTypeSet initial_types(BOOKMARKS, NIGORI, PASSWORDS);
- SyncBackendRegistrar registrar(initial_types, "test", &profile, &loop_);
+ SyncBackendRegistrar registrar("test", &profile, &loop_);
+ registrar.SetInitialTypes(initial_types);
EXPECT_TRUE(registrar.IsNigoriEnabled());
{
std::vector<syncer::ModelSafeWorker*> workers;
@@ -111,7 +113,8 @@ TEST_F(SyncBackendRegistrarTest, ConstructorNonEmpty) {
TEST_F(SyncBackendRegistrarTest, ConfigureDataTypes) {
TestingProfile profile;
- SyncBackendRegistrar registrar(ModelTypeSet(), "test", &profile, &loop_);
+ SyncBackendRegistrar registrar("test", &profile, &loop_);
+ registrar.SetInitialTypes(ModelTypeSet());
// Add.
const ModelTypeSet types1(BOOKMARKS, NIGORI, AUTOFILL);
@@ -155,7 +158,8 @@ void TriggerChanges(SyncBackendRegistrar* registrar, ModelType type) {
TEST_F(SyncBackendRegistrarTest, ActivateDeactivateUIDataType) {
InSequence in_sequence;
TestingProfile profile;
- SyncBackendRegistrar registrar(ModelTypeSet(), "test", &profile, &loop_);
+ SyncBackendRegistrar registrar("test", &profile, &loop_);
+ registrar.SetInitialTypes(ModelTypeSet());
// Should do nothing.
TriggerChanges(&registrar, BOOKMARKS);
@@ -202,7 +206,8 @@ TEST_F(SyncBackendRegistrarTest, ActivateDeactivateNonUIDataType) {
content::TestBrowserThread db_thread(BrowserThread::DB, &loop_);
InSequence in_sequence;
TestingProfile profile;
- SyncBackendRegistrar registrar(ModelTypeSet(), "test", &profile, &loop_);
+ SyncBackendRegistrar registrar("test", &profile, &loop_);
+ registrar.SetInitialTypes(ModelTypeSet());
// Should do nothing.
TriggerChanges(&registrar, AUTOFILL);
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698