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

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

Issue 14344002: Sync: Turn on full history sync by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use-after-free. Created 7 years, 8 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
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/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"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "chrome/test/base/testing_pref_service_syncable.h" 12 #include "chrome/test/base/testing_pref_service_syncable.h"
13 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace browser_sync { 17 namespace browser_sync {
18 18
19 namespace { 19 namespace {
20 20
21 using ::testing::InSequence; 21 using ::testing::InSequence;
22 using ::testing::StrictMock; 22 using ::testing::StrictMock;
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 CommandLine::ForCurrentProcess()->AppendSwitch(
28 switches::kHistoryEnableFullHistorySync);
29 SyncPrefs::RegisterUserPrefs(pref_service_.registry()); 27 SyncPrefs::RegisterUserPrefs(pref_service_.registry());
30 } 28 }
31 29
32 TestingPrefServiceSyncable pref_service_; 30 TestingPrefServiceSyncable pref_service_;
33 31
34 private: 32 private:
35 MessageLoop loop_; 33 MessageLoop loop_;
36 }; 34 };
37 35
38 TEST_F(SyncPrefsTest, Basic) { 36 TEST_F(SyncPrefsTest, Basic) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); 241 EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced());
244 const syncer::ModelTypeSet user_types = syncer::UserTypes(); 242 const syncer::ModelTypeSet user_types = syncer::UserTypes();
245 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); 243 EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty());
246 EXPECT_FALSE(sync_prefs.IsManaged()); 244 EXPECT_FALSE(sync_prefs.IsManaged());
247 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); 245 EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty());
248 } 246 }
249 247
250 } // namespace 248 } // namespace
251 249
252 } // namespace browser_sync 250 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/browser/sync/test/integration/enable_disable_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698