| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <memory> | 5 #include <memory> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 EXPECT_EQ(CONTENT_SETTING_BLOCK, | 214 EXPECT_EQ(CONTENT_SETTING_BLOCK, |
| 215 host_content_settings_map->GetContentSetting( | 215 host_content_settings_map->GetContentSetting( |
| 216 host, host, CONTENT_SETTINGS_TYPE_POPUPS, std::string())); | 216 host, host, CONTENT_SETTINGS_TYPE_POPUPS, std::string())); |
| 217 EXPECT_EQ(CONTENT_SETTING_ASK, | 217 EXPECT_EQ(CONTENT_SETTING_ASK, |
| 218 host_content_settings_map->GetContentSetting( | 218 host_content_settings_map->GetContentSetting( |
| 219 host, host, CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string())); | 219 host, host, CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string())); |
| 220 EXPECT_EQ( | 220 EXPECT_EQ( |
| 221 CONTENT_SETTING_ASK, | 221 CONTENT_SETTING_ASK, |
| 222 host_content_settings_map->GetContentSetting( | 222 host_content_settings_map->GetContentSetting( |
| 223 host, host, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string())); | 223 host, host, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string())); |
| 224 EXPECT_EQ(CONTENT_SETTING_ASK, | |
| 225 host_content_settings_map->GetContentSetting( | |
| 226 host, host, CONTENT_SETTINGS_TYPE_FULLSCREEN, std::string())); | |
| 227 | 224 |
| 228 host_content_settings_map->SetContentSettingDefaultScope( | 225 host_content_settings_map->SetContentSettingDefaultScope( |
| 229 host, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), | 226 host, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
| 230 CONTENT_SETTING_ALLOW); | 227 CONTENT_SETTING_ALLOW); |
| 231 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 228 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
| 232 host_content_settings_map->GetContentSetting( | 229 host_content_settings_map->GetContentSetting( |
| 233 host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); | 230 host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
| 234 | 231 |
| 235 host_content_settings_map->SetContentSettingDefaultScope( | 232 host_content_settings_map->SetContentSettingDefaultScope( |
| 236 host, GURL(), CONTENT_SETTINGS_TYPE_AUTOPLAY, std::string(), | 233 host, GURL(), CONTENT_SETTINGS_TYPE_AUTOPLAY, std::string(), |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 host_content_settings_map->ClearSettingsForOneTypeWithPredicate( | 1734 host_content_settings_map->ClearSettingsForOneTypeWithPredicate( |
| 1738 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, | 1735 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, |
| 1739 base::Bind(&MatchPrimaryPattern, http_pattern)); | 1736 base::Bind(&MatchPrimaryPattern, http_pattern)); |
| 1740 // Verify we only have one, and it's url1. | 1737 // Verify we only have one, and it's url1. |
| 1741 host_content_settings_map->GetSettingsForOneType( | 1738 host_content_settings_map->GetSettingsForOneType( |
| 1742 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings); | 1739 CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, std::string(), &host_settings); |
| 1743 EXPECT_EQ(1u, host_settings.size()); | 1740 EXPECT_EQ(1u, host_settings.size()); |
| 1744 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1), | 1741 EXPECT_EQ(ContentSettingsPattern::FromURLNoWildcard(url1), |
| 1745 host_settings[0].primary_pattern); | 1742 host_settings[0].primary_pattern); |
| 1746 } | 1743 } |
| OLD | NEW |