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

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

Issue 10520010: Not for review: Support sync init with missing or corrupt store (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Documentation 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 side-by-side diff with in-line comments
Download patch
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 9fb301399ebbfe0f440b99be3affdad2b06681c0..7fef03173713f9478697912b1ecfc289c0b0cabb 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc
@@ -73,7 +73,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<ModelSafeWorker*> workers;
@@ -89,7 +90,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<ModelSafeWorker*> workers;
@@ -110,7 +112,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);
@@ -154,7 +157,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);
@@ -201,7 +205,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);

Powered by Google App Engine
This is Rietveld 408576698