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

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

Issue 2510363003: Only activate radio buttons in ContentSettingsBubble for valid content settings. This prevents fail… (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3fa66be04939857be3c0759865cc28e9909804c9..f779dd7b77e9bdeaf32223b08aacb1de2c456541 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -1801,3 +1801,19 @@ TEST_F(HostContentSettingsMapTest, ClearSettingsForOneTypeWithPredicate) {
EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1),
host_settings[0].primary_pattern);
}
+
+TEST_F(HostContentSettingsMapTest, CanSetNarrowestSetting) {
+ TestingProfile profile;
+ const auto* map = HostContentSettingsMapFactory::GetForProfile(&profile);
+
+ GURL valid_url("http://google.com");
+ EXPECT_TRUE(map->CanSetNarrowestContentSetting(
+ valid_url, valid_url,
+ CONTENT_SETTINGS_TYPE_POPUPS));
+
+ GURL invalid_url("about:blank");
+ EXPECT_FALSE(map->CanSetNarrowestContentSetting(
+ invalid_url, invalid_url,
+ CONTENT_SETTINGS_TYPE_POPUPS));
+}
+
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698