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

Unified Diff: components/content_settings/core/browser/content_settings_registry_unittest.cc

Issue 1318083005: Remove HostContentSettingsMap::ContentTypeHasCompoundValue function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-num-types-enum-3
Patch Set: Created 5 years, 3 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: components/content_settings/core/browser/content_settings_registry_unittest.cc
diff --git a/components/content_settings/core/browser/content_settings_registry_unittest.cc b/components/content_settings/core/browser/content_settings_registry_unittest.cc
index aea9a8138c281f878bfadfe8e1fa18e5362e02bd..ad664ef1f50bcd903ff4df2e8dc1018c3d300814 100644
--- a/components/content_settings/core/browser/content_settings_registry_unittest.cc
+++ b/components/content_settings/core/browser/content_settings_registry_unittest.cc
@@ -64,4 +64,24 @@ TEST_F(ContentSettingsRegistryTest, Properties) {
website_settings_info);
}
+TEST_F(ContentSettingsRegistryTest, Iteration) {
+ // Check that plugins and cookies settings appear once during iteration.
+ bool plugins_found = false;
+ bool cookies_found = false;
+ for (const ContentSettingsInfo* info : *registry()) {
+ ContentSettingsType type = info->website_settings_info()->type();
+ EXPECT_EQ(registry()->Get(type), info);
+ if (type == CONTENT_SETTINGS_TYPE_PLUGINS) {
+ EXPECT_FALSE(plugins_found);
+ plugins_found = true;
+ } else if (type == CONTENT_SETTINGS_TYPE_COOKIES) {
+ EXPECT_FALSE(cookies_found);
+ cookies_found = true;
+ }
+ }
+
+ EXPECT_TRUE(plugins_found);
+ EXPECT_TRUE(cookies_found);
+}
+
} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698