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

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

Issue 2655303004: Add id properties to PointerEvent (Closed)
Patch Set: pointer id Created 3 years, 10 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/browser/renderer_host/input/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 EXPECT_EQ(arg2, std::get<1>(param)); 108 EXPECT_EQ(arg2, std::get<1>(param));
109 } 109 }
110 110
111 #if defined(USE_AURA) 111 #if defined(USE_AURA)
112 bool TouchEventsAreEquivalent(const ui::TouchEvent& first, 112 bool TouchEventsAreEquivalent(const ui::TouchEvent& first,
113 const ui::TouchEvent& second) { 113 const ui::TouchEvent& second) {
114 if (first.type() != second.type()) 114 if (first.type() != second.type())
115 return false; 115 return false;
116 if (first.location() != second.location()) 116 if (first.location() != second.location())
117 return false; 117 return false;
118 if (first.touch_id() != second.touch_id()) 118 if (first.pointer_details().id != second.pointer_details().id)
119 return false; 119 return false;
120 if (second.time_stamp() != first.time_stamp()) 120 if (second.time_stamp() != first.time_stamp())
121 return false; 121 return false;
122 return true; 122 return true;
123 } 123 }
124 124
125 bool EventListIsSubset(const ScopedVector<ui::TouchEvent>& subset, 125 bool EventListIsSubset(const ScopedVector<ui::TouchEvent>& subset,
126 const ScopedVector<ui::TouchEvent>& set) { 126 const ScopedVector<ui::TouchEvent>& set) {
127 if (subset.size() > set.size()) 127 if (subset.size() > set.size())
128 return false; 128 return false;
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); 2281 EXPECT_EQ(80, sent_event->data.flingStart.velocityY);
2282 2282
2283 const WebGestureEvent* filter_event = 2283 const WebGestureEvent* filter_event =
2284 GetFilterWebInputEvent<WebGestureEvent>(); 2284 GetFilterWebInputEvent<WebGestureEvent>();
2285 TestLocationInFilterEvent(filter_event, orig); 2285 TestLocationInFilterEvent(filter_event, orig);
2286 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); 2286 EXPECT_EQ(30, filter_event->data.flingStart.velocityX);
2287 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); 2287 EXPECT_EQ(40, filter_event->data.flingStart.velocityY);
2288 } 2288 }
2289 2289
2290 } // namespace content 2290 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698