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

Unified Diff: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc

Issue 1442083002: Stop inheriting push notification permissions from regular to incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review nits Created 5 years 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 side-by-side diff with in-line comments
Download patch
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 bcb56d989655f984d5d509ad389ec7b5c5cad5e9..ca6fe9eea0e10418d4c599d6ad2345719e80fc58 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -141,34 +141,20 @@ 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));
- EXPECT_EQ(NULL,
- GetContentSettingValue(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- false));
+ TestUtils::GetContentSetting(&provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(), false));
+ EXPECT_EQ(NULL, TestUtils::GetContentSettingValue(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES, std::string(), false));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
- GetContentSetting(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_IMAGES,
- std::string(),
- false));
- scoped_ptr<base::Value> value_ptr(
- GetContentSettingValue(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_IMAGES,
- std::string(),
- false));
+ TestUtils::GetContentSetting(&provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string(), false));
+ scoped_ptr<base::Value> value_ptr(TestUtils::GetContentSettingValue(
+ &provider, google_url, google_url, CONTENT_SETTINGS_TYPE_IMAGES,
+ std::string(), false));
int int_value = -1;
value_ptr->GetAsInteger(&int_value);
@@ -186,12 +172,9 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
value_block.get());
EXPECT_FALSE(owned);
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(&provider,
- youtube_url,
- youtube_url,
- CONTENT_SETTINGS_TYPE_COOKIES,
- std::string(),
- false));
+ TestUtils::GetContentSetting(&provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ std::string(), false));
provider.ShutdownOnUIThread();
}
@@ -212,24 +195,21 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
GURL google_url("http://mail.google.com");
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(
- &provider, youtube_url, youtube_url,
- CONTENT_SETTINGS_TYPE_PLUGINS, "someplugin", false));
+ TestUtils::GetContentSetting(&provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ "someplugin", false));
// 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));
+ TestUtils::GetContentSetting(&provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ std::string(), false));
EXPECT_EQ(CONTENT_SETTING_DEFAULT,
- GetContentSetting(
- &provider, google_url, google_url,
- CONTENT_SETTINGS_TYPE_PLUGINS, "someplugin", false));
+ TestUtils::GetContentSetting(&provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_PLUGINS,
+ "someplugin", false));
provider.ShutdownOnUIThread();
}
@@ -242,14 +222,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, TestUtils::GetContentSettingValue(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(), false));
// Set the content settings pattern list for origins to auto select
// certificates.
@@ -261,21 +237,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<base::Value> cert_filter(
- GetContentSettingValue(&provider,
- google_url,
- google_url,
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string(),
- false));
+ EXPECT_EQ(NULL, TestUtils::GetContentSettingValue(
+ &provider, youtube_url, youtube_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(), false));
+ scoped_ptr<base::Value> cert_filter(TestUtils::GetContentSettingValue(
+ &provider, google_url, google_url,
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, std::string(), false));
ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType());
base::DictionaryValue* dict_value =

Powered by Google App Engine
This is Rietveld 408576698