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

Unified Diff: chrome/browser/ui/website_settings/website_settings_unittest.cc

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge 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
Index: chrome/browser/ui/website_settings/website_settings_unittest.cc
diff --git a/chrome/browser/ui/website_settings/website_settings_unittest.cc b/chrome/browser/ui/website_settings/website_settings_unittest.cc
index 2aa93224810da99da10efba74d5aba84e4959326..14631ee8a4635c2e9a5c8c9ff612d960d9788146 100644
--- a/chrome/browser/ui/website_settings/website_settings_unittest.cc
+++ b/chrome/browser/ui/website_settings/website_settings_unittest.cc
@@ -37,6 +37,7 @@
#include "net/test/cert_test_util.h"
#include "net/test/test_certificate_data.h"
#include "net/test/test_data_directory.h"
+#include "ppapi/features/features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -196,7 +197,7 @@ TEST_F(WebsiteSettingsTest, OnPermissionsChanged) {
ContentSetting setting = content_settings->GetContentSetting(
url(), url(), CONTENT_SETTINGS_TYPE_POPUPS, std::string());
EXPECT_EQ(setting, CONTENT_SETTING_BLOCK);
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
setting = content_settings->GetContentSetting(
url(), url(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
EXPECT_EQ(setting, CONTENT_SETTING_DETECT_IMPORTANT_CONTENT);
@@ -219,7 +220,7 @@ TEST_F(WebsiteSettingsTest, OnPermissionsChanged) {
// SetPermissionInfo() is called once initially, and then again every time
// OnSitePermissionChanged() is called.
-#if !defined(ENABLE_PLUGINS)
+#if !BUILDFLAG(ENABLE_PLUGINS)
// SetPermissionInfo for plugins didn't get called.
EXPECT_CALL(*mock_ui(), SetPermissionInfoStub()).Times(6);
#else
@@ -231,7 +232,7 @@ TEST_F(WebsiteSettingsTest, OnPermissionsChanged) {
// Execute code under tests.
website_settings()->OnSitePermissionChanged(CONTENT_SETTINGS_TYPE_POPUPS,
CONTENT_SETTING_ALLOW);
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
website_settings()->OnSitePermissionChanged(CONTENT_SETTINGS_TYPE_PLUGINS,
CONTENT_SETTING_BLOCK);
#endif
@@ -248,7 +249,7 @@ TEST_F(WebsiteSettingsTest, OnPermissionsChanged) {
setting = content_settings->GetContentSetting(
url(), url(), CONTENT_SETTINGS_TYPE_POPUPS, std::string());
EXPECT_EQ(setting, CONTENT_SETTING_ALLOW);
-#if defined(ENABLE_PLUGINS)
+#if BUILDFLAG(ENABLE_PLUGINS)
setting = content_settings->GetContentSetting(
url(), url(), CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
EXPECT_EQ(setting, CONTENT_SETTING_BLOCK);
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_ui.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698