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

Unified Diff: components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc

Issue 2600253002: Aggregate DocumentSubresourceFilter counters on page level. (Closed)
Patch Set: Created 4 years 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: components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc
diff --git a/components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc b/components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc
index e81c9cc64deb40b0cc5510d65ab88ecb4430c758..6bb11d74897c2090d6cd2b5dab928fe85ebbcefe 100644
--- a/components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc
+++ b/components/subresource_filter/content/renderer/document_subresource_filter_unittest.cc
@@ -86,10 +86,10 @@ TEST_F(DocumentSubresourceFilterTest, DryRun) {
EXPECT_TRUE(filter.allowLoad(GURL(kTestBetaURL), request_context));
const auto& statistics = filter.statistics();
- EXPECT_EQ(3u, statistics.num_loads_total);
- EXPECT_EQ(2u, statistics.num_loads_evaluated);
- EXPECT_EQ(1u, statistics.num_loads_matching_rules);
- EXPECT_EQ(0u, statistics.num_loads_disallowed);
+ EXPECT_EQ(3, statistics.num_loads_total);
+ EXPECT_EQ(2, statistics.num_loads_evaluated);
+ EXPECT_EQ(1, statistics.num_loads_matching_rules);
+ EXPECT_EQ(0, statistics.num_loads_disallowed);
EXPECT_EQ(0u, first_disallowed_load_callback_receiver.callback_count());
}
@@ -106,10 +106,10 @@ TEST_F(DocumentSubresourceFilterTest, Enabled) {
EXPECT_TRUE(filter.allowLoad(GURL(kTestBetaURL), request_context));
const auto& statistics = filter.statistics();
- EXPECT_EQ(3u, statistics.num_loads_total);
- EXPECT_EQ(2u, statistics.num_loads_evaluated);
- EXPECT_EQ(1u, statistics.num_loads_matching_rules);
- EXPECT_EQ(1u, statistics.num_loads_disallowed);
+ EXPECT_EQ(3, statistics.num_loads_total);
+ EXPECT_EQ(2, statistics.num_loads_evaluated);
+ EXPECT_EQ(1, statistics.num_loads_matching_rules);
+ EXPECT_EQ(1, statistics.num_loads_disallowed);
if (!measure_performance) {
EXPECT_TRUE(statistics.evaluation_total_cpu_duration.is_zero());

Powered by Google App Engine
This is Rietveld 408576698