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 "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/input/main_thread_scrolling_reason.h" | 9 #include "cc/input/main_thread_scrolling_reason.h" |
10 #include "cc/trees/swap_promise_monitor.h" | 10 #include "cc/trees/swap_promise_monitor.h" |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 TEST_P(InputHandlerProxyTest, GestureScrollByCoarsePixels) { | 632 TEST_P(InputHandlerProxyTest, GestureScrollByCoarsePixels) { |
633 #else | 633 #else |
634 TEST_P(InputHandlerProxyTest, DISABLED_GestureScrollByCoarsePixels) { | 634 TEST_P(InputHandlerProxyTest, DISABLED_GestureScrollByCoarsePixels) { |
635 #endif | 635 #endif |
636 SetSmoothScrollEnabled(true); | 636 SetSmoothScrollEnabled(true); |
637 expected_disposition_ = InputHandlerProxy::DID_HANDLE; | 637 expected_disposition_ = InputHandlerProxy::DID_HANDLE; |
638 | 638 |
639 gesture_.type = WebInputEvent::GestureScrollBegin; | 639 gesture_.type = WebInputEvent::GestureScrollBegin; |
640 gesture_.data.scrollBegin.deltaHintUnits = | 640 gesture_.data.scrollBegin.deltaHintUnits = |
641 WebGestureEvent::ScrollUnits::Pixels; | 641 WebGestureEvent::ScrollUnits::Pixels; |
642 EXPECT_CALL(mock_input_handler_, ScrollAnimated(::testing::_, ::testing::_)) | 642 EXPECT_CALL(mock_input_handler_, ScrollBegin(::testing::_, ::testing::_)) |
643 .WillOnce(testing::Return(kImplThreadScrollState)); | 643 .WillOnce(testing::Return(kImplThreadScrollState)); |
| 644 EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_)); |
644 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); | 645 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
645 | 646 |
646 gesture_.type = WebInputEvent::GestureScrollUpdate; | 647 gesture_.type = WebInputEvent::GestureScrollUpdate; |
647 gesture_.data.scrollUpdate.deltaUnits = WebGestureEvent::ScrollUnits::Pixels; | 648 gesture_.data.scrollUpdate.deltaUnits = WebGestureEvent::ScrollUnits::Pixels; |
648 | 649 |
649 EXPECT_CALL(mock_input_handler_, ScrollAnimated(::testing::_, ::testing::_)) | 650 EXPECT_CALL(mock_input_handler_, ScrollAnimated(::testing::_, ::testing::_)) |
650 .WillOnce(testing::Return(kImplThreadScrollState)); | 651 .WillOnce(testing::Return(kImplThreadScrollState)); |
651 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); | 652 EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
652 | 653 |
653 VERIFY_AND_RESET_MOCKS(); | 654 VERIFY_AND_RESET_MOCKS(); |
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2785 testing::Mock::VerifyAndClearExpectations(&mock_input_handler); | 2786 testing::Mock::VerifyAndClearExpectations(&mock_input_handler); |
2786 testing::Mock::VerifyAndClearExpectations(&mock_client); | 2787 testing::Mock::VerifyAndClearExpectations(&mock_client); |
2787 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); | 2788 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); |
2788 } | 2789 } |
2789 | 2790 |
2790 INSTANTIATE_TEST_CASE_P(AnimateInput, | 2791 INSTANTIATE_TEST_CASE_P(AnimateInput, |
2791 InputHandlerProxyTest, | 2792 InputHandlerProxyTest, |
2792 testing::ValuesIn(test_types)); | 2793 testing::ValuesIn(test_types)); |
2793 } // namespace test | 2794 } // namespace test |
2794 } // namespace ui | 2795 } // namespace ui |
OLD | NEW |