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

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

Issue 2603773002: Make SubresourceFilter browsertests work with and without PersistentHistograms. (Closed)
Patch Set: Swap order. 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
« no previous file with comments | « no previous file | no next file » | 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 c1b21385ce4e5640086f097a421982ad1e9d0187..4e1cd2e849524152e0418c7b73c74fb33f35e966 100644
--- a/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
@@ -229,9 +229,13 @@ IN_PROC_BROWSER_TEST_F(SubresourceFilterBrowserTest, NoActivationOnAboutBlank) {
ASSERT_TRUE(frame);
EXPECT_FALSE(WasParsedScriptElementLoaded(frame));
+ // Support both pre-/post-PersistentHistograms worlds. The latter is enabled
+ // through field trials, so the former is still used on offical builders.
+ content::FetchHistogramsFromChildProcesses();
+ SubprocessMetricsProvider::MergeHistogramDeltasForTesting();
+
// The only frames where filtering was (even considered to be) activated
// should be the main frame, and the child that was navigated to an HTTP URL.
- SubprocessMetricsProvider::MergeHistogramDeltasForTesting();
histogram_tester.ExpectUniqueSample(
"SubresourceFilter.DocumentLoad.ActivationState",
static_cast<base::Histogram::Sample>(ActivationState::ENABLED), 2);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698