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

Side by Side Diff: content/browser/renderer_host/input/web_input_event_util_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Needed on Windows to get |M_PI| from <cmath>. 5 // Needed on Windows to get |M_PI| from <cmath>.
6 #ifdef _WIN32 6 #ifdef _WIN32
7 #define _USE_MATH_DEFINES 7 #define _USE_MATH_DEFINES
8 #endif 8 #endif
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 expected_pointer.state = WebTouchPoint::StatePressed; 46 expected_pointer.state = WebTouchPoint::StatePressed;
47 expected_pointer.position = blink::WebFloatPoint(pointer.x, pointer.y); 47 expected_pointer.position = blink::WebFloatPoint(pointer.x, pointer.y);
48 expected_pointer.screenPosition = 48 expected_pointer.screenPosition =
49 blink::WebFloatPoint(pointer.raw_x, pointer.raw_y); 49 blink::WebFloatPoint(pointer.raw_x, pointer.raw_y);
50 expected_pointer.radiusX = pointer.touch_major / 2.f; 50 expected_pointer.radiusX = pointer.touch_major / 2.f;
51 expected_pointer.radiusY = pointer.touch_minor / 2.f; 51 expected_pointer.radiusY = pointer.touch_minor / 2.f;
52 expected_pointer.rotationAngle = 0.f; 52 expected_pointer.rotationAngle = 0.f;
53 expected_pointer.force = pointer.pressure; 53 expected_pointer.force = pointer.pressure;
54 expected_event.touches[0] = expected_pointer; 54 expected_event.touches[0] = expected_pointer;
55 55
56 WebTouchEvent actual_event = CreateWebTouchEventFromMotionEvent(event); 56 WebTouchEvent actual_event = CreateWebTouchEventFromMotionEvent(event, false);
57 EXPECT_EQ(WebInputEventTraits::ToString(expected_event), 57 EXPECT_EQ(WebInputEventTraits::ToString(expected_event),
58 WebInputEventTraits::ToString(actual_event)); 58 WebInputEventTraits::ToString(actual_event));
59 } 59 }
60 60
61 } // namespace content 61 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698