| 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 033b69bb057a5cd28f7a43cf0cc0939b4841595e..c63632f013d6b680c96e5a8760e009feb75ea3ec 100644
|
| --- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
|
| +++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
|
| @@ -186,6 +186,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_ASK,
|
| + provider.ProvideDefaultSetting(
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE));
|
| + provider.UpdateDefaultSetting(
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, CONTENT_SETTING_ALLOW);
|
| + EXPECT_EQ(CONTENT_SETTING_ALLOW,
|
| + provider.ProvideDefaultSetting(
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE));
|
| + provider.ShutdownOnUIThread();
|
| +}
|
| +
|
| // ////////////////////////////////////////////////////////////////////////////
|
| // PrefProviderTest
|
| //
|
| @@ -688,4 +705,34 @@ TEST_F(PrefProviderTest, SyncObsoleteGeolocationPref) {
|
| provider.ShutdownOnUIThread();
|
| }
|
|
|
| +TEST_F(PrefProviderTest, AutoSubmitCertificateContentSetting) {
|
| + TestingProfile profile;
|
| + TestingPrefService* prefs = profile.GetTestingPrefService();
|
| + GURL primary_url("https://www.example.com");
|
| + GURL secondary_url("https://www.sample.com");
|
| +
|
| + PrefProvider provider(prefs, false);
|
| +
|
| + EXPECT_EQ(CONTENT_SETTING_DEFAULT,
|
| + provider.GetContentSetting(
|
| + primary_url,
|
| + primary_url,
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| + std::string()));
|
| +
|
| + provider.SetContentSetting(
|
| + ContentSettingsPattern::FromURL(primary_url),
|
| + ContentSettingsPattern::Wildcard(),
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| + std::string(),
|
| + CONTENT_SETTING_ALLOW);
|
| + EXPECT_EQ(CONTENT_SETTING_ALLOW,
|
| + provider.GetContentSetting(
|
| + primary_url,
|
| + secondary_url,
|
| + CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
|
| + std::string()));
|
| + provider.ShutdownOnUIThread();
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|