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

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

Issue 1963203002: [Chrome Settings UI] Show overruled User Exceptions as strike-through. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings.css » ('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 0342cac351efd90c61e3a42c37f096ba1ad1b8e3..1532e97e05c277bbe8f931f0b235ccf1b60acab3 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -81,11 +81,6 @@ class TesterForType {
new base::FundamentalValue(setting));
}
- bool AreUserExceptionsAllowed() {
- return host_content_settings_map_->AreUserExceptionsAllowedForType(
- content_type_);
- }
-
void AddUserException(std::string exception,
ContentSetting content_settings) {
ContentSettingsPattern pattern =
@@ -869,32 +864,6 @@ TEST_F(HostContentSettingsMapTest, OffTheRecordDontInheritSetting) {
std::string(), nullptr));
}
-TEST_F(HostContentSettingsMapTest, AreUserExceptionsAllowedForType) {
- ContentSettingsType kContentTypesToTest[] = {
- CONTENT_SETTINGS_TYPE_COOKIES,
- CONTENT_SETTINGS_TYPE_POPUPS,
- };
-
- TestingProfile profile;
-
- for (ContentSettingsType type : kContentTypesToTest) {
- TesterForType tester(&profile, type);
-
- // No settings: Yes.
- tester.ClearPolicyDefault();
- EXPECT_TRUE(tester.AreUserExceptionsAllowed());
-
- // Policy enforces default value: No.
- tester.SetPolicyDefault(CONTENT_SETTING_ALLOW);
- EXPECT_FALSE(tester.AreUserExceptionsAllowed());
- tester.SetPolicyDefault(CONTENT_SETTING_BLOCK);
- EXPECT_FALSE(tester.AreUserExceptionsAllowed());
-
- // Cleanup for next iteration.
- tester.ClearPolicyDefault();
- }
-}
-
TEST_F(HostContentSettingsMapTest, PrefExceptionsOperation) {
using content_settings::SETTING_SOURCE_POLICY;
using content_settings::SETTING_SOURCE_USER;
« no previous file with comments | « no previous file | chrome/browser/resources/options/content_settings.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698