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

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

Issue 1218663006: Use new WebTouchPoint field names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 "content/common/input/input_event.h" 7 #include "content/common/input/input_event.h"
8 #include "content/common/input/synthetic_gesture_params.h" 8 #include "content/common/input/synthetic_gesture_params.h"
9 #include "content/common/input/synthetic_pinch_gesture_params.h" 9 #include "content/common/input/synthetic_pinch_gesture_params.h"
10 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" 10 #include "content/common/input/synthetic_smooth_drag_gesture_params.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 events.push_back(new InputEvent(mouse_event, latency, false)); 178 events.push_back(new InputEvent(mouse_event, latency, false));
179 179
180 blink::WebGestureEvent gesture_event; 180 blink::WebGestureEvent gesture_event;
181 gesture_event.type = blink::WebInputEvent::GestureScrollBegin; 181 gesture_event.type = blink::WebInputEvent::GestureScrollBegin;
182 gesture_event.x = -1; 182 gesture_event.x = -1;
183 events.push_back(new InputEvent(gesture_event, latency, false)); 183 events.push_back(new InputEvent(gesture_event, latency, false));
184 184
185 blink::WebTouchEvent touch_event; 185 blink::WebTouchEvent touch_event;
186 touch_event.type = blink::WebInputEvent::TouchStart; 186 touch_event.type = blink::WebInputEvent::TouchStart;
187 touch_event.touchesLength = 1; 187 touch_event.touchesLength = 1;
188 touch_event.touches[0].radiusX = 1; 188 touch_event.touches[0].width = 1;
189 events.push_back(new InputEvent(touch_event, latency, false)); 189 events.push_back(new InputEvent(touch_event, latency, false));
190 190
191 Verify(events); 191 Verify(events);
192 } 192 }
193 193
194 TEST_F(InputParamTraitsTest, InvalidSyntheticGestureParams) { 194 TEST_F(InputParamTraitsTest, InvalidSyntheticGestureParams) {
195 IPC::Message msg; 195 IPC::Message msg;
196 // Write invalid value for SyntheticGestureParams::GestureType. 196 // Write invalid value for SyntheticGestureParams::GestureType.
197 WriteParam(&msg, -3); 197 WriteParam(&msg, -3);
198 198
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ASSERT_EQ(SyntheticGestureParams::TAP_GESTURE, 243 ASSERT_EQ(SyntheticGestureParams::TAP_GESTURE,
244 gesture_params->GetGestureType()); 244 gesture_params->GetGestureType());
245 SyntheticGesturePacket packet_in; 245 SyntheticGesturePacket packet_in;
246 packet_in.set_gesture_params(gesture_params.Pass()); 246 packet_in.set_gesture_params(gesture_params.Pass());
247 247
248 Verify(packet_in); 248 Verify(packet_in);
249 } 249 }
250 250
251 } // namespace 251 } // namespace
252 } // namespace content 252 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/ui_events_helper.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