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

Unified Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 2289593006: Fix recording of kAnimatingScrollOnMain (Closed)
Patch Set: update comment Created 4 years, 4 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 | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/input_handler_proxy_unittest.cc
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index 28a95d7df73c74bfefae01ddbabf96cc545b098f..e8eb2cb28ccf42abfb5604e8318700c4620517b0 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -2785,6 +2785,20 @@ TEST_P(InputHandlerProxyTest, MainThreadScrollingMouseWheelHistograms) {
EXPECT_THAT(
histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1),
+ base::Bucket(5, 1)));
+
+ // We only want to record "animating scroll on main thread" reason if it's the
+ // only reason. If it's not the only reason, the "real" reason for scrolling
+ // on main is something else, and we only want to pay attention to that
+ // reason. So we should only include this reason in the histogram when its on
+ // its own.
+ input_handler_->RecordMainThreadScrollingReasonsForTest(
+ blink::WebGestureDeviceTouchpad,
+ cc::MainThreadScrollingReason::kAnimatingScrollOnMainThread);
+
+ EXPECT_THAT(
+ histogram_tester().GetAllSamples("Renderer4.MainThreadWheelScrollReason"),
+ testing::ElementsAre(base::Bucket(1, 1), base::Bucket(3, 1),
base::Bucket(5, 1), base::Bucket(14, 1)));
}
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698