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

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

Issue 2600253002: Aggregate DocumentSubresourceFilter counters on page level. (Closed)
Patch Set: rebase Created 3 years, 11 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/subresource_filter/content/browser/content_subresource_filter_driver_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/subresource_filter/subresource_filter_browsertest.cc
diff --git a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
index 5b79e0e8cb5a783b5feb2e8c78de2e566fbd0233..d191c3e62aa1309d92cd86620983aa6f4a0fad90 100644
--- a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
@@ -63,6 +63,15 @@ constexpr const char kSubresourceLoadsMatchedRules[] =
constexpr const char kSubresourceLoadsDisallowed[] =
"SubresourceFilter.DocumentLoad.NumSubresourceLoads.Disallowed";
+constexpr const char kSubresourceLoadsTotalForPage[] =
+ "SubresourceFilter.PageLoad.NumSubresourceLoads.Total";
+constexpr const char kSubresourceLoadsEvaluatedForPage[] =
+ "SubresourceFilter.PageLoad.NumSubresourceLoads.Evaluated";
+constexpr const char kSubresourceLoadsMatchedRulesForPage[] =
+ "SubresourceFilter.PageLoad.NumSubresourceLoads.MatchedRules";
+constexpr const char kSubresourceLoadsDisallowedForPage[] =
+ "SubresourceFilter.PageLoad.NumSubresourceLoads.Disallowed";
+
// Names of the performance measurement histograms.
constexpr const char kActivationWallDuration[] =
"SubresourceFilter.DocumentLoad.Activation.WallDuration";
@@ -607,6 +616,10 @@ void ExpectHistogramsAreRecordedForTestFrameSet(
expect_performance_measurements && ScopedThreadTimers::IsSupported();
// The following histograms are generated on the browser side.
+ tester.ExpectUniqueSample(kSubresourceLoadsTotalForPage, 6, 1);
+ tester.ExpectUniqueSample(kSubresourceLoadsEvaluatedForPage, 6, 1);
+ tester.ExpectUniqueSample(kSubresourceLoadsMatchedRulesForPage, 4, 1);
+ tester.ExpectUniqueSample(kSubresourceLoadsDisallowedForPage, 4, 1);
tester.ExpectTotalCount(kEvaluationTotalWallDurationForPage, time_recorded);
tester.ExpectTotalCount(kEvaluationTotalCPUDurationForPage, time_recorded);
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698