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

Side by Side Diff: content/common/input/input_param_traits_unittest.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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
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 "content/common/input/input_param_traits.h" 5 #include "content/common/input/input_param_traits.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 blink::WebMouseWheelEvent wheel_event( 209 blink::WebMouseWheelEvent wheel_event(
210 blink::WebInputEvent::MouseWheel, blink::WebInputEvent::NoModifiers, 210 blink::WebInputEvent::MouseWheel, blink::WebInputEvent::NoModifiers,
211 blink::WebInputEvent::TimeStampForTesting); 211 blink::WebInputEvent::TimeStampForTesting);
212 wheel_event.deltaX = 10; 212 wheel_event.deltaX = 10;
213 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1); 213 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1);
214 events.push_back(base::MakeUnique<InputEvent>(wheel_event, latency)); 214 events.push_back(base::MakeUnique<InputEvent>(wheel_event, latency));
215 215
216 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, 216 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown,
217 blink::WebInputEvent::NoModifiers, 217 blink::WebInputEvent::NoModifiers,
218 blink::WebInputEvent::TimeStampForTesting); 218 blink::WebInputEvent::TimeStampForTesting);
219 mouse_event.x = 10; 219 mouse_event.setPositionInWidget(10, 0);
220 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); 220 latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2);
221 events.push_back(base::MakeUnique<InputEvent>(mouse_event, latency)); 221 events.push_back(base::MakeUnique<InputEvent>(mouse_event, latency));
222 222
223 blink::WebGestureEvent gesture_event( 223 blink::WebGestureEvent gesture_event(
224 blink::WebInputEvent::GestureScrollBegin, 224 blink::WebInputEvent::GestureScrollBegin,
225 blink::WebInputEvent::NoModifiers, 225 blink::WebInputEvent::NoModifiers,
226 blink::WebInputEvent::TimeStampForTesting); 226 blink::WebInputEvent::TimeStampForTesting);
227 gesture_event.x = -1; 227 gesture_event.x = -1;
228 events.push_back(base::MakeUnique<InputEvent>(gesture_event, latency)); 228 events.push_back(base::MakeUnique<InputEvent>(gesture_event, latency));
229 229
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION_LIST, 361 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION_LIST,
362 gesture_params->GetGestureType()); 362 gesture_params->GetGestureType());
363 SyntheticGesturePacket packet_in; 363 SyntheticGesturePacket packet_in;
364 packet_in.set_gesture_params(std::move(gesture_params)); 364 packet_in.set_gesture_params(std::move(gesture_params));
365 Verify(packet_in); 365 Verify(packet_in);
366 } 366 }
367 367
368 } // namespace 368 } // namespace
369 } // namespace content 369 } // namespace content
OLDNEW
« no previous file with comments | « content/common/input/event_with_latency_info_unittest.cc ('k') | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698