| Index: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
|
| diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
|
| index 433bbd7ab0bd9ecc74f8457d61add2ed48e3c2bc..4f72ccf3ceb2fc5d2e3444e8911447ecf03603b0 100644
|
| --- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
|
| +++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
|
| @@ -281,4 +281,23 @@ TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
|
| provider.ShutdownOnUIThread();
|
| }
|
|
|
| +TEST_F(PolicyProviderTest, InvalidManagedDefaultContentSetting) {
|
| + TestingProfile profile;
|
| + sync_preferences::TestingPrefServiceSyncable* prefs =
|
| + profile.GetTestingPrefService();
|
| + PolicyProvider provider(prefs);
|
| +
|
| + prefs->SetManagedPref(
|
| + prefs::kManagedDefaultCookiesSetting,
|
| + base::MakeUnique<base::Value>(CONTENT_SETTING_DETECT_IMPORTANT_CONTENT));
|
| +
|
| + // The setting provided in the cookies pref is not valid for cookies. It
|
| + // should be ignored.
|
| + std::unique_ptr<RuleIterator> rule_iterator(provider.GetRuleIterator(
|
| + CONTENT_SETTINGS_TYPE_COOKIES, std::string(), false));
|
| + EXPECT_FALSE(rule_iterator);
|
| +
|
| + provider.ShutdownOnUIThread();
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|