Index: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
index eb17585e8cde1c8604b78a97541570fa43b02b07..7df0be3a000313d0a4af97e039d82795184953fe 100644 |
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc |
@@ -167,6 +167,23 @@ TEST_F(PrefDefaultProviderTest, MigrateDefaultGeolocationContentSetting) { |
provider.ShutdownOnUIThread(); |
} |
+TEST_F(PrefDefaultProviderTest, AutoSubmitCertificateContentSetting) { |
+ TestingProfile profile; |
+ TestingPrefService* prefs = profile.GetTestingPrefService(); |
+ |
+ PrefDefaultProvider provider(prefs, false); |
+ |
+ EXPECT_EQ(CONTENT_SETTING_BLOCK, |
+ provider.ProvideDefaultSetting( |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE)); |
+ provider.UpdateDefaultSetting( |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE, CONTENT_SETTING_ALLOW); |
+ EXPECT_EQ(CONTENT_SETTING_ALLOW, |
+ provider.ProvideDefaultSetting( |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE)); |
+ provider.ShutdownOnUIThread(); |
+} |
+ |
// //////////////////////////////////////////////////////////////////////////// |
// PrefProviderTest |
// |
@@ -489,4 +506,34 @@ TEST_F(PrefProviderTest, SyncObsoletePref) { |
provider.ShutdownOnUIThread(); |
} |
+TEST_F(PrefProviderTest, AutoSubmitCertificateContentSetting) { |
+ TestingProfile profile; |
+ TestingPrefService* prefs = profile.GetTestingPrefService(); |
+ GURL primary_url("http://www.example.com"); |
+ GURL secondary_url("http://www.sample.com"); |
+ |
+ PrefProvider provider(prefs, false); |
+ |
+ EXPECT_EQ(CONTENT_SETTING_DEFAULT, |
+ provider.GetContentSetting( |
+ primary_url, |
+ primary_url, |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE, |
+ std::string())); |
wtc
2011/08/11 18:33:55
Why is the expected value CONTENT_SETTING_DEFAULT
markusheintz_
2011/08/15 19:09:04
We have two kinds of content settings provider: De
|
+ |
+ provider.SetContentSetting( |
+ ContentSettingsPattern::FromURL(primary_url), |
+ ContentSettingsPattern::Wildcard(), |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE, |
+ std::string(), |
+ CONTENT_SETTING_ALLOW); |
+ EXPECT_EQ(CONTENT_SETTING_ALLOW, |
+ provider.GetContentSetting( |
+ primary_url, |
+ secondary_url, |
+ CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE, |
+ std::string())); |
+ provider.ShutdownOnUIThread(); |
+} |
+ |
} // namespace content_settings |