Chromium Code Reviews| Index: content/common/input/event_with_latency_info_unittest.cc |
| diff --git a/content/common/input/event_with_latency_info_unittest.cc b/content/common/input/event_with_latency_info_unittest.cc |
| index 45907f7117b11d39e2b7bb7b1b33b9d729671047..b7f6d5cddd6e2209a3b13f148882e7258ed764bd 100644 |
| --- a/content/common/input/event_with_latency_info_unittest.cc |
| +++ b/content/common/input/event_with_latency_info_unittest.cc |
| @@ -313,6 +313,18 @@ TEST_F(EventWithLatencyInfoTest, WebMouseWheelEventCoalescing) { |
| mouse_wheel_0.event.modifiers = WebInputEvent::ControlKey; |
| mouse_wheel_1.event.modifiers = WebInputEvent::ShiftKey; |
| EXPECT_FALSE(CanCoalesce(mouse_wheel_0, mouse_wheel_1)); |
| + |
| + // Coalesced event has the position of the most recent event. |
| + mouse_wheel_0 = CreateMouseWheel(1, 1); |
| + mouse_wheel_0.event.x = 1; |
| + mouse_wheel_0.event.y = 1; |
| + mouse_wheel_1 = CreateMouseWheel(2, 2); |
| + mouse_wheel_1.event.x = 2; |
| + mouse_wheel_1.event.y = 2; |
| + EXPECT_TRUE(CanCoalesce(mouse_wheel_0, mouse_wheel_1)); |
| + Coalesce(mouse_wheel_0, &mouse_wheel_1); |
|
dtapuska
2016/08/19 01:41:41
Ultimately this coalescing test could probably be
tdresser
2016/08/19 12:43:30
The naming here is a bit confusing.
We might want
sahel
2016/08/19 15:17:56
Done.
sahel
2016/08/19 15:17:57
Then naming is consistent with the rest of the uni
|
| + EXPECT_EQ(1, mouse_wheel_1.event.x); |
| + EXPECT_EQ(1, mouse_wheel_1.event.y); |
| } |
| // Coalescing preserves the newer timestamp. |