| 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1003       mock_input_handler_, |  1003       mock_input_handler_, | 
|  1004       ScrollBy(testing::Property(&cc::ScrollState::delta_x, testing::Lt(0)))) |  1004       ScrollBy(testing::Property(&cc::ScrollState::delta_x, testing::Lt(0)))) | 
|  1005       .WillOnce(testing::Return(scroll_result_did_not_scroll_)); |  1005       .WillOnce(testing::Return(scroll_result_did_not_scroll_)); | 
|  1006  |  1006  | 
|  1007   // When scroll latching is enabled, ScrollEnd gets called when the last |  1007   // When scroll latching is enabled, ScrollEnd gets called when the last | 
|  1008   // ScrollBy did not scroll. |  1008   // ScrollBy did not scroll. | 
|  1009   EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_)); |  1009   EXPECT_CALL(mock_input_handler_, ScrollEnd(testing::_)); | 
|  1010   time += base::TimeDelta::FromMilliseconds(100); |  1010   time += base::TimeDelta::FromMilliseconds(100); | 
|  1011   Animate(time); |  1011   Animate(time); | 
|  1012  |  1012  | 
 |  1013   VERIFY_AND_RESET_MOCKS(); | 
 |  1014  | 
|  1013   // Fling has ended, the last Animate won't cause any more wheel ticks. |  1015   // Fling has ended, the last Animate won't cause any more wheel ticks. | 
|  1014   EXPECT_CALL(mock_input_handler_, ScrollBy(testing::_)).Times(0); |  1016   EXPECT_CALL(mock_input_handler_, ScrollBy(testing::_)).Times(0); | 
 |  1017   time += base::TimeDelta::FromMilliseconds(100); | 
 |  1018   Animate(time); | 
|  1015  |  1019  | 
|  1016   VERIFY_AND_RESET_MOCKS(); |  1020   VERIFY_AND_RESET_MOCKS(); | 
|  1017 } |  1021 } | 
|  1018  |  1022  | 
|  1019 TEST_P(InputHandlerProxyTest, GestureFlingOnMainThreadTouchpad) { |  1023 TEST_P(InputHandlerProxyTest, GestureFlingOnMainThreadTouchpad) { | 
|  1020   // We should send all events to the widget for this gesture. |  1024   // We should send all events to the widget for this gesture. | 
|  1021   expected_disposition_ = InputHandlerProxy::DID_NOT_HANDLE; |  1025   expected_disposition_ = InputHandlerProxy::DID_NOT_HANDLE; | 
|  1022   VERIFY_AND_RESET_MOCKS(); |  1026   VERIFY_AND_RESET_MOCKS(); | 
|  1023  |  1027  | 
|  1024   EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |  1028   EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) | 
| (...skipping 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3230   EXPECT_EQ(WebInputEvent::GesturePinchEnd, event_queue()[6]->event().type); |  3234   EXPECT_EQ(WebInputEvent::GesturePinchEnd, event_queue()[6]->event().type); | 
|  3231   testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |  3235   testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); | 
|  3232 } |  3236 } | 
|  3233  |  3237  | 
|  3234 INSTANTIATE_TEST_CASE_P(AnimateInput, |  3238 INSTANTIATE_TEST_CASE_P(AnimateInput, | 
|  3235                         InputHandlerProxyTest, |  3239                         InputHandlerProxyTest, | 
|  3236                         testing::ValuesIn(test_types)); |  3240                         testing::ValuesIn(test_types)); | 
|  3237  |  3241  | 
|  3238 }  // namespace test |  3242 }  // namespace test | 
|  3239 }  // namespace ui |  3243 }  // namespace ui | 
| OLD | NEW |