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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs_unittest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/prefs/incognito_mode_prefs.h" 5 #include "chrome/browser/prefs/incognito_mode_prefs.h"
6 6
7 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
8 #include "chrome/test/base/testing_pref_service.h" 8 #include "chrome/test/base/testing_pref_service.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 class IncognitoModePrefsTest : public testing::Test { 11 class IncognitoModePrefsTest : public testing::Test {
12 protected: 12 protected:
13 virtual void SetUp() { 13 virtual void SetUp() {
14 IncognitoModePrefs::RegisterUserPrefs(&prefs_); 14 IncognitoModePrefs::RegisterUserPrefs(&prefs_);
15 } 15 }
16 16
17 TestingPrefService prefs_; 17 TestingPrefServiceSyncable prefs_;
18 }; 18 };
19 19
20 TEST_F(IncognitoModePrefsTest, IntToAvailability) { 20 TEST_F(IncognitoModePrefsTest, IntToAvailability) {
21 ASSERT_EQ(0, IncognitoModePrefs::ENABLED); 21 ASSERT_EQ(0, IncognitoModePrefs::ENABLED);
22 ASSERT_EQ(1, IncognitoModePrefs::DISABLED); 22 ASSERT_EQ(1, IncognitoModePrefs::DISABLED);
23 ASSERT_EQ(2, IncognitoModePrefs::FORCED); 23 ASSERT_EQ(2, IncognitoModePrefs::FORCED);
24 24
25 IncognitoModePrefs::Availability incognito; 25 IncognitoModePrefs::Availability incognito;
26 EXPECT_TRUE(IncognitoModePrefs::IntToAvailability(0, &incognito)); 26 EXPECT_TRUE(IncognitoModePrefs::IntToAvailability(0, &incognito));
27 EXPECT_EQ(IncognitoModePrefs::ENABLED, incognito); 27 EXPECT_EQ(IncognitoModePrefs::ENABLED, incognito);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }, ""); 74 }, "");
75 #else 75 #else
76 EXPECT_DEBUG_DEATH({ 76 EXPECT_DEBUG_DEATH({
77 IncognitoModePrefs::Availability availability = 77 IncognitoModePrefs::Availability availability =
78 IncognitoModePrefs::GetAvailability(&prefs_); 78 IncognitoModePrefs::GetAvailability(&prefs_);
79 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability); 79 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
80 }, ""); 80 }, "");
81 #endif 81 #endif
82 } 82 }
83 #endif // GTEST_HAS_DEATH_TEST 83 #endif // GTEST_HAS_DEATH_TEST
OLDNEW
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | chrome/browser/prefs/pref_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698