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

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

Issue 902443002: Add unit tests for the 'disable-sync' flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/profile_sync_service_factory_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698