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

Unified Diff: content/common/input/web_input_event_traits_unittest.cc

Issue 2052663004: Remove canScroll from WebMouseWheelEvent as it is unused now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix android unit test 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
Index: content/common/input/web_input_event_traits_unittest.cc
diff --git a/content/common/input/web_input_event_traits_unittest.cc b/content/common/input/web_input_event_traits_unittest.cc
index 1daf80dcf1a4927ec6b994983aba1530e96acefe..7c773f4f45a691f5abeece374a86e16e3338af2c 100644
--- a/content/common/input/web_input_event_traits_unittest.cc
+++ b/content/common/input/web_input_event_traits_unittest.cc
@@ -52,14 +52,11 @@ class WebInputEventTraitsTest : public testing::Test {
return event;
}
- static WebMouseWheelEvent CreateMouseWheel(float deltaX,
- float deltaY,
- bool canScroll) {
+ static WebMouseWheelEvent CreateMouseWheel(float deltaX, float deltaY) {
WebMouseWheelEvent event;
event.type = WebInputEvent::MouseWheel;
event.deltaX = deltaX;
event.deltaY = deltaY;
- event.canScroll = canScroll;
return event;
}
};
@@ -202,25 +199,16 @@ TEST_F(WebInputEventTraitsTest, PinchEventCoalescing) {
}
TEST_F(WebInputEventTraitsTest, WebMouseWheelEventCoalescing) {
- WebMouseWheelEvent mouse_wheel_0 =
- CreateMouseWheel(1, 1, true);
- WebMouseWheelEvent mouse_wheel_1 =
- CreateMouseWheel(2, 2, true);
+ WebMouseWheelEvent mouse_wheel_0 = CreateMouseWheel(1, 1);
+ WebMouseWheelEvent mouse_wheel_1 = CreateMouseWheel(2, 2);
// WebMouseWheelEvent objects with same values except different deltaX and
// deltaY should coalesce.
EXPECT_TRUE(WebInputEventTraits::CanCoalesce(mouse_wheel_0, mouse_wheel_1));
- mouse_wheel_0 = CreateMouseWheel(1, 1, true);
- mouse_wheel_1 = CreateMouseWheel(1, 1, false);
-
- // WebMouseWheelEvent objects with different canScroll values should not
- // coalesce.
- EXPECT_FALSE(WebInputEventTraits::CanCoalesce(mouse_wheel_0, mouse_wheel_1));
-
// WebMouseWheelEvent objects with different modifiers should not coalesce.
- mouse_wheel_0 = CreateMouseWheel(1, 1, true);
- mouse_wheel_1 = CreateMouseWheel(1, 1, true);
+ mouse_wheel_0 = CreateMouseWheel(1, 1);
+ mouse_wheel_1 = CreateMouseWheel(1, 1);
mouse_wheel_0.modifiers = blink::WebInputEvent::ControlKey;
mouse_wheel_1.modifiers = blink::WebInputEvent::ShiftKey;
EXPECT_FALSE(WebInputEventTraits::CanCoalesce(mouse_wheel_0, mouse_wheel_1));
@@ -228,9 +216,9 @@ TEST_F(WebInputEventTraitsTest, WebMouseWheelEventCoalescing) {
// Coalescing preserves the newer timestamp.
TEST_F(WebInputEventTraitsTest, TimestampCoalescing) {
- WebMouseWheelEvent mouse_wheel_0 = CreateMouseWheel(1, 1, true);
+ WebMouseWheelEvent mouse_wheel_0 = CreateMouseWheel(1, 1);
mouse_wheel_0.timeStampSeconds = 5.0;
- WebMouseWheelEvent mouse_wheel_1 = CreateMouseWheel(2, 2, true);
+ WebMouseWheelEvent mouse_wheel_1 = CreateMouseWheel(2, 2);
mouse_wheel_1.timeStampSeconds = 10.0;
EXPECT_TRUE(WebInputEventTraits::CanCoalesce(mouse_wheel_0, mouse_wheel_1));
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | content/renderer/input/render_widget_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698