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

Unified Diff: content/renderer/render_widget_unittest.cc

Issue 1955643002: Add UMA metric to track the time saved on making events passive during fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change bucket size and comments Created 4 years, 7 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 | « content/renderer/input/render_widget_input_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget_unittest.cc
diff --git a/content/renderer/render_widget_unittest.cc b/content/renderer/render_widget_unittest.cc
index 05ebc45a747109cd147ee60dc4e734f5880c884c..91b687f20d9d7ea2cbbaa6421d9ea0f9d644795e 100644
--- a/content/renderer/render_widget_unittest.cc
+++ b/content/renderer/render_widget_unittest.cc
@@ -327,4 +327,24 @@ TEST_F(RenderWidgetUnittest, RenderWidgetInputEventUmaMetrics) {
PASSIVE_LISTENER_UMA_ENUM_CANCELABLE_AND_CANCELED, 1);
}
+TEST_F(RenderWidgetUnittest, TouchStartDuringOrOutsideFlingUmaMetrics) {
+ EXPECT_CALL(*widget()->mock_webwidget(), handleInputEvent(_))
+ .Times(2)
+ .WillRepeatedly(
+ ::testing::Return(blink::WebInputEventResult::NotHandled));
+
+ SyntheticWebTouchEvent touch;
+ touch.PressPoint(10, 10);
+ touch.dispatchType = blink::WebInputEvent::DispatchType::Blocking;
+ touch.dispatchedDuringFling = true;
+ widget()->SendInputEvent(touch);
+ histogram_tester().ExpectTotalCount(
+ "Event.Touch.TouchStartLatencyDuringFling", 1);
+
+ touch.dispatchedDuringFling = false;
+ widget()->SendInputEvent(touch);
+ histogram_tester().ExpectTotalCount(
+ "Event.Touch.TouchStartLatencyOutsideFling", 1);
+}
+
} // namespace content
« no previous file with comments | « content/renderer/input/render_widget_input_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698