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

Unified Diff: chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc

Issue 2875133002: [subresource_filter] Add ContentSettings.{Exceptions,Default} metrics (Closed)
Patch Set: fix test Created 3 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 | components/content_settings/core/browser/content_settings_default_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
diff --git a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
index 4fd37f176d0edbadc53ccd2c7de04ded8bd15b3a..7d07dbc13cc02ad5b068d08010a789c156c46345 100644
--- a/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
@@ -78,8 +78,8 @@ class SubresourceFilterContentSettingsManagerTest : public testing::Test {
base::ScopedTempDir scoped_dir_;
content::TestBrowserThreadBundle thread_bundle_;
- TestingProfile testing_profile_;
base::HistogramTester histogram_tester_;
+ TestingProfile testing_profile_;
// Owned by the testing_profile_.
SubresourceFilterContentSettingsManager* settings_manager_ = nullptr;
@@ -102,6 +102,13 @@ class SubresourceFilterContentSettingsManagerHistoryTest
}
};
+TEST_F(SubresourceFilterContentSettingsManagerTest, LogDefaultSetting) {
+ const char kDefaultContentSetting[] =
+ "ContentSettings.DefaultSubresourceFilterSetting";
+ // The histogram should be logged at profile creation.
+ histogram_tester().ExpectTotalCount(kDefaultContentSetting, 1);
+}
+
TEST_F(SubresourceFilterContentSettingsManagerTest, IrrelevantSetting) {
GetSettingsMap()->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_POPUPS,
CONTENT_SETTING_ALLOW);
« no previous file with comments | « no previous file | components/content_settings/core/browser/content_settings_default_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698