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

Unified Diff: ui/events/event_unittest.cc

Issue 1993383002: Adding Event.Latency.Browser.WheelUI, Passing latency_info to ProcessMouse/MouseWheelEvent functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/event.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 09e25fba6252ed4271f5a51e57147edf8e75f83d..a4d83f0ba1024f63e1c792a2ad17cdd889aa0090 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -887,6 +887,21 @@ TEST(EventTest, PointerEventClone) {
}
}
+TEST(EventTest, MouseEventLatencyUIComponentExists) {
+ const gfx::Point origin(0, 0);
+ MouseEvent mouseev(ET_MOUSE_PRESSED, origin, origin, EventTimeForNow(), 0, 0);
+ EXPECT_TRUE(mouseev.latency()->FindLatency(
+ ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, nullptr));
+}
+
+TEST(EventTest, MouseWheelEventLatencyUIComponentExists) {
+ const gfx::Point origin(0, 0);
+ MouseWheelEvent mouseWheelev(gfx::Vector2d(), origin, origin,
+ EventTimeForNow(), 0, 0);
+ EXPECT_TRUE(mouseWheelev.latency()->FindLatency(
+ ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, nullptr));
+}
+
TEST(EventTest, PointerEventToMouseEvent) {
const struct {
ui::EventType in_type;
@@ -1009,5 +1024,4 @@ TEST(EventTest, EventLatencyOSMouseWheelHistogram) {
#endif
}
-
} // namespace ui
« no previous file with comments | « ui/events/event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698