OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 service()->GetLastSyncedTimeString()); | 632 service()->GetLastSyncedTimeString()); |
633 | 633 |
634 // Sign out. | 634 // Sign out. |
635 service()->DisableForUser(); | 635 service()->DisableForUser(); |
636 PumpLoop(); | 636 PumpLoop(); |
637 | 637 |
638 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER), | 638 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_SYNC_TIME_NEVER), |
639 service()->GetLastSyncedTimeString()); | 639 service()->GetLastSyncedTimeString()); |
640 } | 640 } |
641 | 641 |
| 642 // Verify that the disable sync flag disables sync. |
| 643 TEST_F(ProfileSyncServiceTest, DisableSyncFlag) { |
| 644 base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync); |
| 645 EXPECT_FALSE(ProfileSyncService::IsSyncEnabled()); |
| 646 } |
| 647 |
| 648 // Verify that no disable sync flag enables sync. |
| 649 TEST_F(ProfileSyncServiceTest, NoDisableSyncFlag) { |
| 650 EXPECT_TRUE(ProfileSyncService::IsSyncEnabled()); |
| 651 } |
| 652 |
642 } // namespace | 653 } // namespace |
643 } // namespace browser_sync | 654 } // namespace browser_sync |
OLD | NEW |