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

Unified Diff: chrome/browser/sync/internal_api/syncapi_unittest.cc

Issue 7767013: Add logic to flip Nigori bit to instruct other clients to sync tabs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix CHECK on startup Created 9 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/internal_api/sync_manager.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/internal_api/syncapi_unittest.cc
diff --git a/chrome/browser/sync/internal_api/syncapi_unittest.cc b/chrome/browser/sync/internal_api/syncapi_unittest.cc
index 5e028ec5e9e23af952fd6231277027e3ddeaf7d6..b80d359f45c9e42a1634f1abb84d75b1f12aac66 100644
--- a/chrome/browser/sync/internal_api/syncapi_unittest.cc
+++ b/chrome/browser/sync/internal_api/syncapi_unittest.cc
@@ -916,6 +916,28 @@ TEST_F(SyncManagerTest, UpdateEnabledTypes) {
EXPECT_EQ(2, update_enabled_types_call_count_);
}
+TEST_F(SyncManagerTest, DoNotSyncTabsInNigoriNode) {
+ syncable::ModelTypeSet encrypted_types;
+ encrypted_types.insert(syncable::TYPED_URLS);
+ sync_manager_.MaybeSetSyncTabsInNigoriNode(encrypted_types);
+
+ ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
+ ReadNode node(&trans);
+ ASSERT_TRUE(node.InitByIdLookup(GetIdForDataType(syncable::NIGORI)));
+ EXPECT_FALSE(node.GetNigoriSpecifics().sync_tabs());
+}
+
+TEST_F(SyncManagerTest, SyncTabsInNigoriNode) {
+ syncable::ModelTypeSet encrypted_types;
+ encrypted_types.insert(syncable::SESSIONS);
+ sync_manager_.MaybeSetSyncTabsInNigoriNode(encrypted_types);
+
+ ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
+ ReadNode node(&trans);
+ ASSERT_TRUE(node.InitByIdLookup(GetIdForDataType(syncable::NIGORI)));
+ EXPECT_TRUE(node.GetNigoriSpecifics().sync_tabs());
+}
+
TEST_F(SyncManagerTest, ProcessJsMessage) {
const JsArgList kNoArgs;
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698