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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl_unittest.cc

Issue 718153002: Indicate whether a touch event will cause scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 <math.h> 5 #include <math.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 SyntheticWebGestureEventBuilder::BuildFling(velocityX, 239 SyntheticWebGestureEventBuilder::BuildFling(velocityX,
240 velocityY, 240 velocityY,
241 sourceDevice)); 241 sourceDevice));
242 } 242 }
243 243
244 void SetTouchTimestamp(base::TimeDelta timestamp) { 244 void SetTouchTimestamp(base::TimeDelta timestamp) {
245 touch_event_.SetTimestamp(timestamp); 245 touch_event_.SetTimestamp(timestamp);
246 } 246 }
247 247
248 void SendTouchEvent() { 248 void SendTouchEvent() {
249 touch_event_.causesScrollingIfUncanceled =
250 touch_event_.type == WebInputEvent::TouchMove;
249 input_router_->SendTouchEvent( 251 input_router_->SendTouchEvent(
250 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo())); 252 TouchEventWithLatencyInfo(touch_event_, ui::LatencyInfo()));
251 touch_event_.ResetPoints(); 253 touch_event_.ResetPoints();
252 } 254 }
253 255
254 int PressTouchPoint(int x, int y) { 256 int PressTouchPoint(int x, int y) {
255 return touch_event_.PressPoint(x, y); 257 return touch_event_.PressPoint(x, y);
256 } 258 }
257 259
258 void MoveTouchPoint(int index, int x, int y) { 260 void MoveTouchPoint(int index, int x, int y) {
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 client_overscroll = client_->GetAndResetOverscroll(); 1903 client_overscroll = client_->GetAndResetOverscroll();
1902 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, 1904 EXPECT_EQ(wheel_overscroll.accumulated_overscroll,
1903 client_overscroll.accumulated_overscroll); 1905 client_overscroll.accumulated_overscroll);
1904 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, 1906 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta,
1905 client_overscroll.latest_overscroll_delta); 1907 client_overscroll.latest_overscroll_delta);
1906 EXPECT_EQ(wheel_overscroll.current_fling_velocity, 1908 EXPECT_EQ(wheel_overscroll.current_fling_velocity,
1907 client_overscroll.current_fling_velocity); 1909 client_overscroll.current_fling_velocity);
1908 } 1910 }
1909 1911
1910 } // namespace content 1912 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698