| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/input/input_router_impl.h" | 5 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 SimulateGestureEvent(WebInputEvent::GestureScrollBegin, | 1515 SimulateGestureEvent(WebInputEvent::GestureScrollBegin, |
| 1516 blink::WebGestureDeviceTouchscreen); | 1516 blink::WebGestureDeviceTouchscreen); |
| 1517 EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); | 1517 EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); |
| 1518 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, | 1518 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, |
| 1519 blink::WebGestureDeviceTouchscreen); | 1519 blink::WebGestureDeviceTouchscreen); |
| 1520 EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); | 1520 EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 // Test that the double tap gesture depends on the touch action of the first | 1523 // Test that the double tap gesture depends on the touch action of the first |
| 1524 // tap. | 1524 // tap. |
| 1525 // TODO(dtapuska): Disabled for now crbug.com/697871 |
| 1525 TEST_F(InputRouterImplRafAlignedTouchEnabledTest, | 1526 TEST_F(InputRouterImplRafAlignedTouchEnabledTest, |
| 1526 DoubleTapGestureDependsOnFirstTap) { | 1527 DISABLED_DoubleTapGestureDependsOnFirstTap) { |
| 1527 OnHasTouchEventHandlers(true); | 1528 OnHasTouchEventHandlers(true); |
| 1528 | 1529 |
| 1529 // Sequence 1. | 1530 // Sequence 1. |
| 1530 PressTouchPoint(1, 1); | 1531 PressTouchPoint(1, 1); |
| 1531 uint32_t touch_press_event_id1 = SendTouchEvent(); | 1532 uint32_t touch_press_event_id1 = SendTouchEvent(); |
| 1532 OnSetTouchAction(TOUCH_ACTION_NONE); | 1533 OnSetTouchAction(TOUCH_ACTION_NONE); |
| 1533 SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED, | 1534 SendTouchEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED, |
| 1534 touch_press_event_id1); | 1535 touch_press_event_id1); |
| 1535 | 1536 |
| 1536 ReleaseTouchPoint(0); | 1537 ReleaseTouchPoint(0); |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2366 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); | 2367 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); |
| 2367 | 2368 |
| 2368 const WebGestureEvent* filter_event = | 2369 const WebGestureEvent* filter_event = |
| 2369 GetFilterWebInputEvent<WebGestureEvent>(); | 2370 GetFilterWebInputEvent<WebGestureEvent>(); |
| 2370 TestLocationInFilterEvent(filter_event, orig); | 2371 TestLocationInFilterEvent(filter_event, orig); |
| 2371 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); | 2372 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); |
| 2372 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); | 2373 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); |
| 2373 } | 2374 } |
| 2374 | 2375 |
| 2375 } // namespace content | 2376 } // namespace content |
| OLD | NEW |