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

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

Issue 10854050: sync: Remove WITH_NIGORI and WITHOUT_NIGORI flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/sync_backend_host_unittest.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
index 16770e7d24457f71e23406ce139d85cb65f6a66d..58b34c826e023ba38094a55441025acd4b242805 100644
--- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc
@@ -203,13 +203,12 @@ class SyncBackendHostTest : public testing::Test {
// Synchronously configures the backend's datatypes.
void ConfigureDataTypes(syncer::ModelTypeSet types_to_add,
- syncer::ModelTypeSet types_to_remove,
- BackendDataTypeConfigurer::NigoriState nigori_state) {
+ syncer::ModelTypeSet types_to_remove) {
+ types_to_add.Put(syncer::NIGORI);
backend_->ConfigureDataTypes(
syncer::CONFIGURE_REASON_RECONFIGURATION,
types_to_add,
types_to_remove,
- nigori_state,
base::Bind(&SyncBackendHostTest::DownloadReady,
base::Unretained(this)),
base::Bind(&SyncBackendHostTest::OnDownloadRetry,
@@ -267,8 +266,7 @@ TEST_F(SyncBackendHostTest, FirstTimeSync) {
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().HasAll(
enabled_types_));
EXPECT_TRUE(fake_manager_->InitialSyncEndedTypes().Equals(enabled_types_));
@@ -294,8 +292,7 @@ TEST_F(SyncBackendHostTest, Restart) {
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Empty());
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
enabled_types_).Empty());
@@ -332,8 +329,7 @@ TEST_F(SyncBackendHostTest, PartialTypes) {
// Now do the actual configuration, which should download and apply bookmarks.
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
enabled_types_).Empty());
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
@@ -366,8 +362,7 @@ TEST_F(SyncBackendHostTest, LostDB) {
// The actual configuration should redownload and apply all the enabled types.
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().HasAll(
enabled_types_));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
@@ -384,8 +379,7 @@ TEST_F(SyncBackendHostTest, DisableTypes) {
fake_manager_->GetAndResetCleanedTypes();
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
enabled_types_));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
@@ -401,8 +395,7 @@ TEST_F(SyncBackendHostTest, DisableTypes) {
enabled_types_.RemoveAll(disabled_types);
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
// Only those datatypes disabled should be cleaned. Nothing should be
// downloaded.
@@ -421,8 +414,7 @@ TEST_F(SyncBackendHostTest, AddTypes) {
fake_manager_->GetAndResetCleanedTypes();
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
enabled_types_));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
@@ -437,8 +429,7 @@ TEST_F(SyncBackendHostTest, AddTypes) {
enabled_types_.PutAll(new_types);
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
// Only those datatypes added should be downloaded (plus nigori). Nothing
// should be cleaned aside from the disabled types.
@@ -459,8 +450,7 @@ TEST_F(SyncBackendHostTest, AddDisableTypes) {
fake_manager_->GetAndResetCleanedTypes();
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
enabled_types_));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
@@ -479,8 +469,7 @@ TEST_F(SyncBackendHostTest, AddDisableTypes) {
enabled_types_.RemoveAll(disabled_types);
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
// Only those datatypes added should be downloaded (plus nigori). Nothing
// should be cleaned aside from the disabled types.
@@ -519,8 +508,7 @@ TEST_F(SyncBackendHostTest, NewlySupportedTypes) {
// Downloads and applies the new types.
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
Union(new_types, syncer::ModelTypeSet(syncer::NIGORI))));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
@@ -564,8 +552,7 @@ TEST_F(SyncBackendHostTest, NewlySupportedTypesWithPartialTypes) {
// nigori anyways).
ConfigureDataTypes(enabled_types_,
Difference(syncer::ModelTypeSet::All(),
- enabled_types_),
- BackendDataTypeConfigurer::WITH_NIGORI);
+ enabled_types_));
EXPECT_TRUE(fake_manager_->GetAndResetDownloadedTypes().Equals(
Union(new_types, partial_types)));
EXPECT_TRUE(Intersection(fake_manager_->GetAndResetCleanedTypes(),
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698