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

Unified Diff: chrome/browser/sync/sync_prefs_unittest.cc

Issue 10451058: sync: move invalidation version prefs out of SyncPrefs into InvalidatorStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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/sync_prefs.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_prefs_unittest.cc
diff --git a/chrome/browser/sync/sync_prefs_unittest.cc b/chrome/browser/sync/sync_prefs_unittest.cc
index a52432e53d605d94fd69ee3d72fdd6e7e5679e7f..351d6810d1803138951ce42b75de0738de4a3d77 100644
--- a/chrome/browser/sync/sync_prefs_unittest.cc
+++ b/chrome/browser/sync/sync_prefs_unittest.cc
@@ -125,29 +125,6 @@ TEST_F(SyncPrefsTest, PreferredTypesNotKeepEverythingSynced) {
}
}
-TEST_F(SyncPrefsTest, MaxInvalidationVersions) {
- SyncPrefs sync_prefs(&pref_service_);
-
- sync_notifier::InvalidationVersionMap expected_max_versions;
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
-
- expected_max_versions[syncable::BOOKMARKS] = 2;
- sync_prefs.SetMaxVersion(syncable::BOOKMARKS, 2);
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
-
- expected_max_versions[syncable::PREFERENCES] = 5;
- sync_prefs.SetMaxVersion(syncable::PREFERENCES, 5);
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
-
- expected_max_versions[syncable::APP_NOTIFICATIONS] = 3;
- sync_prefs.SetMaxVersion(syncable::APP_NOTIFICATIONS, 3);
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
-
- expected_max_versions[syncable::APP_NOTIFICATIONS] = 4;
- sync_prefs.SetMaxVersion(syncable::APP_NOTIFICATIONS, 4);
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
-}
-
class MockSyncPrefObserver : public SyncPrefObserver {
public:
MOCK_METHOD1(OnSyncManagedPrefChange, void(bool));
@@ -195,7 +172,6 @@ TEST_F(SyncPrefsTest, ClearPreferences) {
EXPECT_FALSE(sync_prefs.HasSyncSetupCompleted());
EXPECT_EQ(base::Time(), sync_prefs.GetLastSyncedTime());
EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty());
- EXPECT_TRUE(sync_prefs.GetAllMaxVersions().empty());
sync_prefs.SetSyncSetupCompleted();
sync_prefs.SetLastSyncedTime(base::Time::Now());
@@ -204,19 +180,12 @@ TEST_F(SyncPrefsTest, ClearPreferences) {
EXPECT_TRUE(sync_prefs.HasSyncSetupCompleted());
EXPECT_NE(base::Time(), sync_prefs.GetLastSyncedTime());
EXPECT_EQ("token", sync_prefs.GetEncryptionBootstrapToken());
- {
- sync_notifier::InvalidationVersionMap expected_max_versions;
- expected_max_versions[syncable::APP_NOTIFICATIONS] = 3;
- sync_prefs.SetMaxVersion(syncable::APP_NOTIFICATIONS, 3);
- EXPECT_EQ(expected_max_versions, sync_prefs.GetAllMaxVersions());
- }
sync_prefs.ClearPreferences();
EXPECT_FALSE(sync_prefs.HasSyncSetupCompleted());
EXPECT_EQ(base::Time(), sync_prefs.GetLastSyncedTime());
EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty());
- EXPECT_TRUE(sync_prefs.GetAllMaxVersions().empty());
}
TEST_F(SyncPrefsTest, NullPrefService) {
@@ -230,7 +199,6 @@ TEST_F(SyncPrefsTest, NullPrefService) {
EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(non_passive_types).Empty());
EXPECT_FALSE(sync_prefs.IsManaged());
EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty());
- EXPECT_TRUE(sync_prefs.GetAllMaxVersions().empty());
}
} // namespace
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698