Index: chrome/browser/sync/profile_sync_service_unittest.cc |
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc |
index 566b369a86dd44086231c8da801d032934d239bc..044542c8ce508280bc382a319c0a565562cb26ea 100644 |
--- a/chrome/browser/sync/profile_sync_service_unittest.cc |
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc |
@@ -639,5 +639,16 @@ TEST_F(ProfileSyncServiceTest, ClearLastSyncedTimeOnSignOut) { |
service()->GetLastSyncedTimeString()); |
} |
+// Verify that the disable sync flag disables sync. |
+TEST_F(ProfileSyncServiceTest, DisableSyncFlag) { |
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync); |
+ EXPECT_FALSE(ProfileSyncService::IsSyncEnabled()); |
+} |
+ |
+// Verify that no disable sync flag enables sync. |
+TEST_F(ProfileSyncServiceTest, NoDisableSyncFlag) { |
+ EXPECT_TRUE(ProfileSyncService::IsSyncEnabled()); |
+} |
+ |
} // namespace |
} // namespace browser_sync |