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

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

Issue 1320673013: Remove HostContentSettingsMap::IsSettingAllowedForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-issetting-allowed
Patch Set: Created 5 years, 2 months 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/host_content_settings_map_unittest.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index 772215ecf0da1faa2670b6b6f5d070ce7e2866f5..13056e42a73c8f2e0c1cc7399cd2a6cc1667e591 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -958,42 +958,11 @@ TEST_F(HostContentSettingsMapTest, GetContentSetting) {
embedder, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
}
-TEST_F(HostContentSettingsMapTest, IsSettingAllowedForType) {
- TestingProfile profile;
- PrefService* prefs = profile.GetPrefs();
-
- EXPECT_TRUE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_ASK,
- CONTENT_SETTINGS_TYPE_FULLSCREEN));
-
- // The mediastream setting is deprecated.
- EXPECT_FALSE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_ALLOW,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM));
- EXPECT_FALSE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_ASK,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM));
- EXPECT_FALSE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_BLOCK,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM));
-
- // We support the ALLOW value for media permission exceptions,
- // but not as the default setting.
- EXPECT_TRUE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_ALLOW,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC));
- EXPECT_TRUE(HostContentSettingsMap::IsSettingAllowedForType(
- prefs, CONTENT_SETTING_ALLOW,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
+TEST_F(HostContentSettingsMapTest, IsDefaultSettingAllowedForType) {
EXPECT_FALSE(HostContentSettingsMap::IsDefaultSettingAllowedForType(
- prefs, CONTENT_SETTING_ALLOW,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC));
+ CONTENT_SETTING_ALLOW, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC));
EXPECT_FALSE(HostContentSettingsMap::IsDefaultSettingAllowedForType(
- prefs, CONTENT_SETTING_ALLOW,
- CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
-
- // TODO(msramek): Add more checks for setting type - setting pairs where
- // it is not obvious whether or not they are allowed.
+ CONTENT_SETTING_ALLOW, CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA));
}
TEST_F(HostContentSettingsMapTest, AddContentSettingsObserver) {

Powered by Google App Engine
This is Rietveld 408576698