summaryrefslogtreecommitdiffstats
path: root/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/content_settings/content_settings_policy_provider_unittest.cc')
-rw-r--r--chrome/browser/content_settings/content_settings_policy_provider_unittest.cc99
1 files changed, 35 insertions, 64 deletions
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 37b718c..23c43f8 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -150,34 +150,22 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
GURL google_url("http://mail.google.com");
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- false));
+ GetContentSetting(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES, "", false));
EXPECT_EQ(NULL,
- GetContentSettingValue(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- false));
+ GetContentSettingValue(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES, "", false));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
- GetContentSetting(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_IMAGES,
- std::string(),
- false));
+ GetContentSetting(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_IMAGES, "", false));
scoped_ptr<Value> value_ptr(
- GetContentSettingValue(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_IMAGES,
- std::string(),
- false));
+ GetContentSettingValue(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_IMAGES, "", false));
int int_value = -1;
value_ptr->GetAsInteger(&int_value);
@@ -188,19 +176,17 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
// SetWebsiteSetting does nothing.
scoped_ptr<base::Value> value_block(
Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
- bool owned = provider.SetWebsiteSetting(yt_url_pattern,
- yt_url_pattern,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- value_block.get());
+ bool owned = provider.SetWebsiteSetting(
+ yt_url_pattern,
+ yt_url_pattern,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ "",
+ value_block.get());
EXPECT_FALSE(owned);
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- false));
+ GetContentSetting(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES, "", false));
provider.ShutdownOnUIThread();
}
@@ -227,12 +213,9 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
// There is currently no policy support for resource content settings.
// Resource identifiers are simply ignored by the PolicyProvider.
EXPECT_EQ(CONTENT_SETTING_ALLOW,
- GetContentSetting(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_PLUGINS,
- std::string(),
- false));
+ GetContentSetting(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS, "", false));
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
GetContentSetting(
@@ -249,14 +232,10 @@ TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
PolicyProvider provider(prefs);
GURL google_url("https://mail.google.com");
// Tests the default setting for auto selecting certificates
- EXPECT_EQ(
- NULL,
- GetContentSettingValue(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string(),
- false));
+ EXPECT_EQ(NULL,
+ GetContentSettingValue(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
// Set the content settings pattern list for origins to auto select
// certificates.
@@ -268,21 +247,13 @@ TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
prefs->SetManagedPref(prefs::kManagedAutoSelectCertificateForUrls,
value);
GURL youtube_url("https://www.youtube.com");
- EXPECT_EQ(
- NULL,
- GetContentSettingValue(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string(),
- false));
- scoped_ptr<Value> cert_filter(
- GetContentSettingValue(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string(),
- false));
+ EXPECT_EQ(NULL,
+ GetContentSettingValue(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
+ scoped_ptr<Value> cert_filter(GetContentSettingValue(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "", false));
ASSERT_EQ(Value::TYPE_DICTIONARY, cert_filter->GetType());
DictionaryValue* dict_value =