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

Unified Diff: components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bmcquade@ first review Created 4 years, 5 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
Index: components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
index fa9943c06b4eda3c8901cd5750f488f6d61ccb20..1395ecf3b7e0fef5608604e527543deb0075d3f5 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer_unittest.cc
@@ -415,7 +415,10 @@ TEST_F(MetricsWebContentsObserverTest, LogAbortChains) {
histogram_tester_.ExpectTotalCount(internal::kAbortChainSizeNewNavigation, 1);
histogram_tester_.ExpectBucketCount(internal::kAbortChainSizeNewNavigation, 3,
1);
- CheckNoErrorEvents();
+ // The second and third navigation signal multiple aborted provisional loads.
+ // This is due to us not calling WillStartNavigationRequest in unit tests.
+ CheckErrorEvent(ERR_NAVIGATION_SIGNALS_MULIPLE_ABORTED_LOADS, 2);
+ CheckTotalErrorEvents();
}
TEST_F(MetricsWebContentsObserverTest, LogAbortChainsSameURL) {

Powered by Google App Engine
This is Rietveld 408576698