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 "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 // sequence on the floor, except for the ScrollEnd. | 743 // sequence on the floor, except for the ScrollEnd. |
744 expected_disposition_ = InputHandlerProxy::DROP_EVENT; | 744 expected_disposition_ = InputHandlerProxy::DROP_EVENT; |
745 VERIFY_AND_RESET_MOCKS(); | 745 VERIFY_AND_RESET_MOCKS(); |
746 | 746 |
747 EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) | 747 EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
748 .WillOnce(testing::Return(kScrollIgnoredScrollState)); | 748 .WillOnce(testing::Return(kScrollIgnoredScrollState)); |
749 | 749 |
750 gesture_.SetType(WebInputEvent::kGestureScrollBegin); | 750 gesture_.SetType(WebInputEvent::kGestureScrollBegin); |
751 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); | 751 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
752 | 752 |
753 expected_disposition_ = InputHandlerProxy::DID_NOT_HANDLE; | 753 // GSB is dropped and not sent to the main thread, GSE shouldn't get sent to |
| 754 // the main thread, either. |
| 755 expected_disposition_ = InputHandlerProxy::DROP_EVENT; |
754 gesture_.SetType(WebInputEvent::kGestureScrollEnd); | 756 gesture_.SetType(WebInputEvent::kGestureScrollEnd); |
755 EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_)) | 757 EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_)) |
756 .WillOnce(testing::Return()); | 758 .WillOnce(testing::Return()); |
757 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); | 759 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
758 | 760 |
759 VERIFY_AND_RESET_MOCKS(); | 761 VERIFY_AND_RESET_MOCKS(); |
760 } | 762 } |
761 | 763 |
762 TEST_P(InputHandlerProxyTest, GestureScrollByPage) { | 764 TEST_P(InputHandlerProxyTest, GestureScrollByPage) { |
763 // We should send all events to the widget for this gesture. | 765 // We should send all events to the widget for this gesture. |
(...skipping 3146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3910 INSTANTIATE_TEST_CASE_P(AnimateInput, | 3912 INSTANTIATE_TEST_CASE_P(AnimateInput, |
3911 InputHandlerProxyWithoutWheelScrollLatchingTest, | 3913 InputHandlerProxyWithoutWheelScrollLatchingTest, |
3912 testing::ValuesIn(test_types)); | 3914 testing::ValuesIn(test_types)); |
3913 | 3915 |
3914 INSTANTIATE_TEST_CASE_P(InputHandlerProxyEventQueueTests, | 3916 INSTANTIATE_TEST_CASE_P(InputHandlerProxyEventQueueTests, |
3915 InputHandlerProxyEventQueueTest, | 3917 InputHandlerProxyEventQueueTest, |
3916 testing::Bool()); | 3918 testing::Bool()); |
3917 | 3919 |
3918 } // namespace test | 3920 } // namespace test |
3919 } // namespace ui | 3921 } // namespace ui |
OLD | NEW |