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

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

Issue 1991623005: Only Register() platform specific content settings types on different platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 years, 7 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 4184b8c99a29ef3a4b54661777100a8f865170a0..957ae3340438ad2dd084dc5d480898d8ca3fa944 100644
--- a/components/content_settings/core/browser/content_settings_registry_unittest.cc
+++ b/components/content_settings/core/browser/content_settings_registry_unittest.cc
@@ -72,21 +72,28 @@ TEST_F(ContentSettingsRegistryTest, Properties) {
TEST_F(ContentSettingsRegistryTest, Iteration) {
// Check that plugins and cookies settings appear once during iteration.
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
raymes 2016/05/20 19:10:16 instead of ifdefing this out, perhaps we could jus
lshang 2016/05/24 11:55:45 Done.
bool plugins_found = false;
+#endif
bool cookies_found = false;
for (const ContentSettingsInfo* info : *registry()) {
ContentSettingsType type = info->website_settings_info()->type();
EXPECT_EQ(registry()->Get(type), info);
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
if (type == CONTENT_SETTINGS_TYPE_PLUGINS) {
EXPECT_FALSE(plugins_found);
plugins_found = true;
- } else if (type == CONTENT_SETTINGS_TYPE_COOKIES) {
+ }
+#endif
+ if (type == CONTENT_SETTINGS_TYPE_COOKIES) {
EXPECT_FALSE(cookies_found);
cookies_found = true;
}
}
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
EXPECT_TRUE(plugins_found);
+#endif
EXPECT_TRUE(cookies_found);
}

Powered by Google App Engine
This is Rietveld 408576698