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

Side by Side Diff: chrome/browser/sync/sync_prefs_unittest.cc

Issue 12315053: Fix prefs registration in SyncPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/test/base/testing_pref_service_syncable.h" 9 #include "chrome/test/base/testing_pref_service_syncable.h"
10 #include "sync/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 namespace { 16 namespace {
17 17
18 using ::testing::InSequence; 18 using ::testing::InSequence;
19 using ::testing::StrictMock; 19 using ::testing::StrictMock;
20 20
21 class SyncPrefsTest : public testing::Test { 21 class SyncPrefsTest : public testing::Test {
22 protected: 22 protected:
23 virtual void SetUp() OVERRIDE { 23 virtual void SetUp() OVERRIDE {
24 SyncPrefs::RegisterUserPrefs(&pref_service_, 24 SyncPrefs::RegisterUserPrefs(pref_service_.registry());
25 pref_service_.registry());
26 } 25 }
27 26
28 TestingPrefServiceSyncable pref_service_; 27 TestingPrefServiceSyncable pref_service_;
29 28
30 private: 29 private:
31 MessageLoop loop_; 30 MessageLoop loop_;
32 }; 31 };
33 32
34 TEST_F(SyncPrefsTest, Basic) { 33 TEST_F(SyncPrefsTest, Basic) {
35 SyncPrefs sync_prefs(&pref_service_); 34 SyncPrefs sync_prefs(&pref_service_);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); 188 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced());
190 const syncer::ModelTypeSet user_types = syncer::UserTypes(); 189 const syncer::ModelTypeSet user_types = syncer::UserTypes();
191 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); 190 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty());
192 EXPECT_FALSE(sync_prefs.IsManaged()); 191 EXPECT_FALSE(sync_prefs.IsManaged());
193 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); 192 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty());
194 } 193 }
195 194
196 } // namespace 195 } // namespace
197 196
198 } // namespace browser_sync 197 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698