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

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

Issue 1981843003: Touch Action could cause wheel gestures to be filtered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 EXPECT_EQ(20.f, sent_event->data.scrollUpdate.deltaX); 2209 EXPECT_EQ(20.f, sent_event->data.scrollUpdate.deltaX);
2210 EXPECT_EQ(40.f, sent_event->data.scrollUpdate.deltaY); 2210 EXPECT_EQ(40.f, sent_event->data.scrollUpdate.deltaY);
2211 2211
2212 const WebGestureEvent* filter_event = 2212 const WebGestureEvent* filter_event =
2213 GetFilterWebInputEvent<WebGestureEvent>(); 2213 GetFilterWebInputEvent<WebGestureEvent>();
2214 EXPECT_EQ(10.f, filter_event->data.scrollUpdate.deltaX); 2214 EXPECT_EQ(10.f, filter_event->data.scrollUpdate.deltaX);
2215 EXPECT_EQ(20.f, filter_event->data.scrollUpdate.deltaY); 2215 EXPECT_EQ(20.f, filter_event->data.scrollUpdate.deltaY);
2216 } 2216 }
2217 2217
2218 TEST_F(InputRouterImplScaleGestureEventTest, GestureScrollBegin) { 2218 TEST_F(InputRouterImplScaleGestureEventTest, GestureScrollBegin) {
2219 SimulateGestureEvent( 2219 SimulateGestureEvent(SyntheticWebGestureEventBuilder::BuildScrollBegin(
2220 SyntheticWebGestureEventBuilder::BuildScrollBegin(10.f, 20.f)); 2220 10.f, 20.f, blink::WebGestureDeviceTouchscreen));
2221 const WebGestureEvent* sent_event = GetSentWebInputEvent<WebGestureEvent>(); 2221 const WebGestureEvent* sent_event = GetSentWebInputEvent<WebGestureEvent>();
2222 EXPECT_EQ(20.f, sent_event->data.scrollBegin.deltaXHint); 2222 EXPECT_EQ(20.f, sent_event->data.scrollBegin.deltaXHint);
2223 EXPECT_EQ(40.f, sent_event->data.scrollBegin.deltaYHint); 2223 EXPECT_EQ(40.f, sent_event->data.scrollBegin.deltaYHint);
2224 2224
2225 const WebGestureEvent* filter_event = 2225 const WebGestureEvent* filter_event =
2226 GetFilterWebInputEvent<WebGestureEvent>(); 2226 GetFilterWebInputEvent<WebGestureEvent>();
2227 EXPECT_EQ(10.f, filter_event->data.scrollBegin.deltaXHint); 2227 EXPECT_EQ(10.f, filter_event->data.scrollBegin.deltaXHint);
2228 EXPECT_EQ(20.f, filter_event->data.scrollBegin.deltaYHint); 2228 EXPECT_EQ(20.f, filter_event->data.scrollBegin.deltaYHint);
2229 } 2229 }
2230 2230
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); 2329 EXPECT_EQ(80, sent_event->data.flingStart.velocityY);
2330 2330
2331 const WebGestureEvent* filter_event = 2331 const WebGestureEvent* filter_event =
2332 GetFilterWebInputEvent<WebGestureEvent>(); 2332 GetFilterWebInputEvent<WebGestureEvent>();
2333 TestLocationInFilterEvent(filter_event, orig); 2333 TestLocationInFilterEvent(filter_event, orig);
2334 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); 2334 EXPECT_EQ(30, filter_event->data.flingStart.velocityX);
2335 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); 2335 EXPECT_EQ(40, filter_event->data.flingStart.velocityY);
2336 } 2336 }
2337 2337
2338 } // namespace content 2338 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698