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

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

Issue 950053002: Cache the Windows Parental Controls Platform Answer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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_syncable.h" 8 #include "chrome/test/base/testing_pref_service_syncable.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 void SetUp() override { 13 void SetUp() override {
14 IncognitoModePrefs::RegisterProfilePrefs(prefs_.registry()); 14 IncognitoModePrefs::RegisterProfilePrefs(prefs_.registry());
15 #if defined(OS_WIN)
16 IncognitoModePrefs::InitializePlatformParentalControls();
17 #endif
15 } 18 }
16 19
17 TestingPrefServiceSyncable prefs_; 20 TestingPrefServiceSyncable prefs_;
18 }; 21 };
19 22
20 TEST_F(IncognitoModePrefsTest, IntToAvailability) { 23 TEST_F(IncognitoModePrefsTest, IntToAvailability) {
21 ASSERT_EQ(0, IncognitoModePrefs::ENABLED); 24 ASSERT_EQ(0, IncognitoModePrefs::ENABLED);
22 ASSERT_EQ(1, IncognitoModePrefs::DISABLED); 25 ASSERT_EQ(1, IncognitoModePrefs::DISABLED);
23 ASSERT_EQ(2, IncognitoModePrefs::FORCED); 26 ASSERT_EQ(2, IncognitoModePrefs::FORCED);
24 27
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }, ""); 70 }, "");
68 #else 71 #else
69 EXPECT_DEBUG_DEATH({ 72 EXPECT_DEBUG_DEATH({
70 IncognitoModePrefs::Availability availability = 73 IncognitoModePrefs::Availability availability =
71 IncognitoModePrefs::GetAvailability(&prefs_); 74 IncognitoModePrefs::GetAvailability(&prefs_);
72 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability); 75 EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
73 }, ""); 76 }, "");
74 #endif 77 #endif
75 } 78 }
76 #endif // GTEST_HAS_DEATH_TEST 79 #endif // GTEST_HAS_DEATH_TEST
OLDNEW
« chrome/browser/prefs/incognito_mode_prefs.cc ('K') | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698