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 "chrome/browser/sync/sync_prefs.h" | 5 #include "chrome/browser/sync/sync_prefs.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 class SyncPrefsTest : public testing::Test { | 24 class SyncPrefsTest : public testing::Test { |
25 protected: | 25 protected: |
26 virtual void SetUp() OVERRIDE { | 26 virtual void SetUp() OVERRIDE { |
27 SyncPrefs::RegisterUserPrefs(pref_service_.registry()); | 27 SyncPrefs::RegisterUserPrefs(pref_service_.registry()); |
28 } | 28 } |
29 | 29 |
30 TestingPrefServiceSyncable pref_service_; | 30 TestingPrefServiceSyncable pref_service_; |
31 | 31 |
32 private: | 32 private: |
33 MessageLoop loop_; | 33 base::MessageLoop loop_; |
34 }; | 34 }; |
35 | 35 |
36 TEST_F(SyncPrefsTest, Basic) { | 36 TEST_F(SyncPrefsTest, Basic) { |
37 SyncPrefs sync_prefs(&pref_service_); | 37 SyncPrefs sync_prefs(&pref_service_); |
38 | 38 |
39 EXPECT_FALSE(sync_prefs.HasSyncSetupCompleted()); | 39 EXPECT_FALSE(sync_prefs.HasSyncSetupCompleted()); |
40 sync_prefs.SetSyncSetupCompleted(); | 40 sync_prefs.SetSyncSetupCompleted(); |
41 EXPECT_TRUE(sync_prefs.HasSyncSetupCompleted()); | 41 EXPECT_TRUE(sync_prefs.HasSyncSetupCompleted()); |
42 | 42 |
43 EXPECT_FALSE(sync_prefs.IsStartSuppressed()); | 43 EXPECT_FALSE(sync_prefs.IsStartSuppressed()); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); | 241 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); |
242 const syncer::ModelTypeSet user_types = syncer::UserTypes(); | 242 const syncer::ModelTypeSet user_types = syncer::UserTypes(); |
243 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); | 243 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); |
244 EXPECT_FALSE(sync_prefs.IsManaged()); | 244 EXPECT_FALSE(sync_prefs.IsManaged()); |
245 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); | 245 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); |
246 } | 246 } |
247 | 247 |
248 } // namespace | 248 } // namespace |
249 | 249 |
250 } // namespace browser_sync | 250 } // namespace browser_sync |
OLD | NEW |