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

Side by Side Diff: Source/web/tests/WebInputEventConversionTest.cpp

Issue 1148813007: Move EventHandler from core/page/ to core/input (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« Source/core/core.gypi ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/Touch.h" 35 #include "core/dom/Touch.h"
36 #include "core/dom/TouchList.h" 36 #include "core/dom/TouchList.h"
37 #include "core/events/GestureEvent.h" 37 #include "core/events/GestureEvent.h"
38 #include "core/events/KeyboardEvent.h" 38 #include "core/events/KeyboardEvent.h"
39 #include "core/events/MouseEvent.h" 39 #include "core/events/MouseEvent.h"
40 #include "core/events/TouchEvent.h" 40 #include "core/events/TouchEvent.h"
41 #include "core/events/WheelEvent.h" 41 #include "core/events/WheelEvent.h"
42 #include "core/frame/FrameHost.h" 42 #include "core/frame/FrameHost.h"
43 #include "core/frame/FrameView.h" 43 #include "core/frame/FrameView.h"
44 #include "core/frame/LocalFrame.h" 44 #include "core/frame/LocalFrame.h"
45 #include "core/input/InputDevice.h"
tdresser 2015/06/04 13:08:47 I don't think these changes belong as part of this
45 #include "core/layout/LayoutView.h" 46 #include "core/layout/LayoutView.h"
46 #include "core/page/Page.h" 47 #include "core/page/Page.h"
47 #include "platform/testing/URLTestHelpers.h" 48 #include "platform/testing/URLTestHelpers.h"
48 #include "public/web/WebFrame.h" 49 #include "public/web/WebFrame.h"
49 #include "public/web/WebSettings.h" 50 #include "public/web/WebSettings.h"
50 #include "web/WebViewImpl.h" 51 #include "web/WebViewImpl.h"
51 #include "web/tests/FrameTestHelpers.h" 52 #include "web/tests/FrameTestHelpers.h"
52 #include <gtest/gtest.h> 53 #include <gtest/gtest.h>
53 54
54 using namespace blink; 55 using namespace blink;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 p0.position = WebFloatPoint(10.f, 10.f); 119 p0.position = WebFloatPoint(10.f, 10.f);
119 p1.position = WebFloatPoint(5.f, 5.f); 120 p1.position = WebFloatPoint(5.f, 5.f);
120 p0.radiusX = p1.radiusY = 10.f; 121 p0.radiusX = p1.radiusY = 10.f;
121 p0.radiusY = p1.radiusX = 5.f; 122 p0.radiusY = p1.radiusX = 5.f;
122 p0.rotationAngle = p1.rotationAngle = 1.f; 123 p0.rotationAngle = p1.rotationAngle = 1.f;
123 p0.force = p1.force = 25.f; 124 p0.force = p1.force = 25.f;
124 125
125 RefPtrWillBeRawPtr<Touch> touch0 = Touch::create(toLocalFrame(webViewImpl->p age()->mainFrame()), document.get(), p0.id, p0.screenPosition, p0.position, Floa tSize(p0.radiusX, p0.radiusY), p0.rotationAngle, p0.force); 126 RefPtrWillBeRawPtr<Touch> touch0 = Touch::create(toLocalFrame(webViewImpl->p age()->mainFrame()), document.get(), p0.id, p0.screenPosition, p0.position, Floa tSize(p0.radiusX, p0.radiusY), p0.rotationAngle, p0.force);
126 RefPtrWillBeRawPtr<Touch> touch1 = Touch::create(toLocalFrame(webViewImpl->p age()->mainFrame()), document.get(), p1.id, p1.screenPosition, p1.position, Floa tSize(p1.radiusX, p1.radiusY), p1.rotationAngle, p1.force); 127 RefPtrWillBeRawPtr<Touch> touch1 = Touch::create(toLocalFrame(webViewImpl->p age()->mainFrame()), document.get(), p1.id, p1.screenPosition, p1.position, Floa tSize(p1.radiusX, p1.radiusY), p1.rotationAngle, p1.force);
127 128
129 InputDevice* sourceDeviceFireTouchEvent = InputDevice::touchEventInstance(). get();
130
128 // Test touchstart. 131 // Test touchstart.
129 { 132 {
130 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create(); 133 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create();
131 touchList->append(touch0); 134 touchList->append(touch0);
132 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow, false, false, false, false, false, false); 135 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, false, false);
133 136
134 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 137 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
135 ASSERT_EQ(1u, webTouchBuilder.touchesLength); 138 ASSERT_EQ(1u, webTouchBuilder.touchesLength);
136 EXPECT_EQ(WebInputEvent::TouchStart, webTouchBuilder.type); 139 EXPECT_EQ(WebInputEvent::TouchStart, webTouchBuilder.type);
137 EXPECT_EQ(WebTouchPoint::StatePressed, webTouchBuilder.touches[0].state) ; 140 EXPECT_EQ(WebTouchPoint::StatePressed, webTouchBuilder.touches[0].state) ;
138 EXPECT_FLOAT_EQ(p0.screenPosition.x, webTouchBuilder.touches[0].screenPo sition.x); 141 EXPECT_FLOAT_EQ(p0.screenPosition.x, webTouchBuilder.touches[0].screenPo sition.x);
139 EXPECT_FLOAT_EQ(p0.screenPosition.y, webTouchBuilder.touches[0].screenPo sition.y); 142 EXPECT_FLOAT_EQ(p0.screenPosition.y, webTouchBuilder.touches[0].screenPo sition.y);
140 EXPECT_FLOAT_EQ(p0.position.x, webTouchBuilder.touches[0].position.x); 143 EXPECT_FLOAT_EQ(p0.position.x, webTouchBuilder.touches[0].position.x);
141 EXPECT_FLOAT_EQ(p0.position.y, webTouchBuilder.touches[0].position.y); 144 EXPECT_FLOAT_EQ(p0.position.y, webTouchBuilder.touches[0].position.y);
142 EXPECT_FLOAT_EQ(p0.radiusX, webTouchBuilder.touches[0].radiusX); 145 EXPECT_FLOAT_EQ(p0.radiusX, webTouchBuilder.touches[0].radiusX);
143 EXPECT_FLOAT_EQ(p0.radiusY, webTouchBuilder.touches[0].radiusY); 146 EXPECT_FLOAT_EQ(p0.radiusY, webTouchBuilder.touches[0].radiusY);
144 EXPECT_FLOAT_EQ(p0.rotationAngle, webTouchBuilder.touches[0].rotationAng le); 147 EXPECT_FLOAT_EQ(p0.rotationAngle, webTouchBuilder.touches[0].rotationAng le);
145 EXPECT_FLOAT_EQ(p0.force, webTouchBuilder.touches[0].force); 148 EXPECT_FLOAT_EQ(p0.force, webTouchBuilder.touches[0].force);
146 } 149 }
147 150
148 // Test touchmove. 151 // Test touchmove.
149 { 152 {
150 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create(); 153 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create();
151 RefPtrWillBeRawPtr<TouchList> movedTouchList = TouchList::create(); 154 RefPtrWillBeRawPtr<TouchList> movedTouchList = TouchList::create();
152 activeTouchList->append(touch0); 155 activeTouchList->append(touch0);
153 activeTouchList->append(touch1); 156 activeTouchList->append(touch1);
154 movedTouchList->append(touch0); 157 movedTouchList->append(touch0);
155 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), movedTouchList.get(), EventTypeNames::touch move, domWindow, false, false, false, false, false, false); 158 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), movedTouchList.get(), EventTypeNames::touch move, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, false, false);
156 159
157 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 160 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
158 ASSERT_EQ(2u, webTouchBuilder.touchesLength); 161 ASSERT_EQ(2u, webTouchBuilder.touchesLength);
159 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type); 162 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type);
160 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[0].state); 163 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[0].state);
161 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[1].sta te); 164 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[1].sta te);
162 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); 165 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id);
163 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); 166 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id);
164 } 167 }
165 168
166 // Test touchmove, different point yields same ordering. 169 // Test touchmove, different point yields same ordering.
167 { 170 {
168 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create(); 171 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create();
169 RefPtrWillBeRawPtr<TouchList> movedTouchList = TouchList::create(); 172 RefPtrWillBeRawPtr<TouchList> movedTouchList = TouchList::create();
170 activeTouchList->append(touch0); 173 activeTouchList->append(touch0);
171 activeTouchList->append(touch1); 174 activeTouchList->append(touch1);
172 movedTouchList->append(touch1); 175 movedTouchList->append(touch1);
173 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), movedTouchList.get(), EventTypeNames::touch move, domWindow, false, false, false, false, false, false); 176 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), movedTouchList.get(), EventTypeNames::touch move, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, false, false);
174 177
175 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 178 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
176 ASSERT_EQ(2u, webTouchBuilder.touchesLength); 179 ASSERT_EQ(2u, webTouchBuilder.touchesLength);
177 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type); 180 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type);
178 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].sta te); 181 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].sta te);
179 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[1].state); 182 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[1].state);
180 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); 183 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id);
181 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); 184 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id);
182 } 185 }
183 186
184 // Test touchend. 187 // Test touchend.
185 { 188 {
186 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create(); 189 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create();
187 RefPtrWillBeRawPtr<TouchList> releasedTouchList = TouchList::create(); 190 RefPtrWillBeRawPtr<TouchList> releasedTouchList = TouchList::create();
188 activeTouchList->append(touch0); 191 activeTouchList->append(touch0);
189 releasedTouchList->append(touch1); 192 releasedTouchList->append(touch1);
190 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), releasedTouchList.get(), EventTypeNames::to uchend, domWindow, false, false, false, false, false, false); 193 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), releasedTouchList.get(), EventTypeNames::to uchend, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, false , false);
191 194
192 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 195 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
193 ASSERT_EQ(2u, webTouchBuilder.touchesLength); 196 ASSERT_EQ(2u, webTouchBuilder.touchesLength);
194 EXPECT_EQ(WebInputEvent::TouchEnd, webTouchBuilder.type); 197 EXPECT_EQ(WebInputEvent::TouchEnd, webTouchBuilder.type);
195 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].sta te); 198 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].sta te);
196 EXPECT_EQ(WebTouchPoint::StateReleased, webTouchBuilder.touches[1].state ); 199 EXPECT_EQ(WebTouchPoint::StateReleased, webTouchBuilder.touches[1].state );
197 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); 200 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id);
198 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); 201 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id);
199 } 202 }
200 203
201 // Test touchcancel. 204 // Test touchcancel.
202 { 205 {
203 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create(); 206 RefPtrWillBeRawPtr<TouchList> activeTouchList = TouchList::create();
204 RefPtrWillBeRawPtr<TouchList> cancelledTouchList = TouchList::create(); 207 RefPtrWillBeRawPtr<TouchList> cancelledTouchList = TouchList::create();
205 cancelledTouchList->append(touch0); 208 cancelledTouchList->append(touch0);
206 cancelledTouchList->append(touch1); 209 cancelledTouchList->append(touch1);
207 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), cancelledTouchList.get(), EventTypeNames::t ouchcancel, domWindow, false, false, false, false, false, false); 210 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(activeTou chList.get(), activeTouchList.get(), cancelledTouchList.get(), EventTypeNames::t ouchcancel, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, f alse, false);
208 211
209 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 212 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
210 ASSERT_EQ(2u, webTouchBuilder.touchesLength); 213 ASSERT_EQ(2u, webTouchBuilder.touchesLength);
211 EXPECT_EQ(WebInputEvent::TouchCancel, webTouchBuilder.type); 214 EXPECT_EQ(WebInputEvent::TouchCancel, webTouchBuilder.type);
212 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].stat e); 215 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].stat e);
213 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].stat e); 216 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].stat e);
214 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); 217 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id);
215 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); 218 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id);
216 } 219 }
217 220
218 // Test max point limit. 221 // Test max point limit.
219 { 222 {
220 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create(); 223 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create();
221 RefPtrWillBeRawPtr<TouchList> changedTouchList = TouchList::create(); 224 RefPtrWillBeRawPtr<TouchList> changedTouchList = TouchList::create();
222 for (unsigned i = 0; i <= static_cast<unsigned>(WebTouchEvent::touchesLe ngthCap) * 2; ++i) { 225 for (unsigned i = 0; i <= static_cast<unsigned>(WebTouchEvent::touchesLe ngthCap) * 2; ++i) {
223 RefPtrWillBeRawPtr<Touch> touch = Touch::create(toLocalFrame(webView Impl->page()->mainFrame()), document.get(), i, p0.screenPosition, p0.position, F loatSize(p0.radiusX, p0.radiusY), p0.rotationAngle, p0.force); 226 RefPtrWillBeRawPtr<Touch> touch = Touch::create(toLocalFrame(webView Impl->page()->mainFrame()), document.get(), i, p0.screenPosition, p0.position, F loatSize(p0.radiusX, p0.radiusY), p0.rotationAngle, p0.force);
224 touchList->append(touch); 227 touchList->append(touch);
225 changedTouchList->append(touch); 228 changedTouchList->append(touch);
226 } 229 }
227 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow, false, false, false, false, false, false); 230 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow, sourceDeviceFireTouchEvent, false, false, false, false, false, false);
228 231
229 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 232 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
230 ASSERT_EQ(static_cast<unsigned>(WebTouchEvent::touchesLengthCap), webTou chBuilder.touchesLength); 233 ASSERT_EQ(static_cast<unsigned>(WebTouchEvent::touchesLengthCap), webTou chBuilder.touchesLength);
231 } 234 }
232 } 235 }
233 236
234 TEST(WebInputEventConversionTest, InputEventsScaling) 237 TEST(WebInputEventConversionTest, InputEventsScaling)
235 { 238 {
236 const std::string baseURL("http://www.test1.com/"); 239 const std::string baseURL("http://www.test1.com/");
237 const std::string fileName("fixed_layout.html"); 240 const std::string fileName("fixed_layout.html");
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 EXPECT_EQ(0, webGestureBuilder.data.scrollUpdate.velocityX); 458 EXPECT_EQ(0, webGestureBuilder.data.scrollUpdate.velocityX);
456 EXPECT_EQ(0, webGestureBuilder.data.scrollUpdate.velocityY); 459 EXPECT_EQ(0, webGestureBuilder.data.scrollUpdate.velocityY);
457 EXPECT_FALSE(webGestureBuilder.data.scrollUpdate.inertial); 460 EXPECT_FALSE(webGestureBuilder.data.scrollUpdate.inertial);
458 EXPECT_FALSE(webGestureBuilder.data.scrollUpdate.preventPropagation); 461 EXPECT_FALSE(webGestureBuilder.data.scrollUpdate.preventPropagation);
459 } 462 }
460 463
461 { 464 {
462 RefPtrWillBeRawPtr<Touch> touch = Touch::create(toLocalFrame(webViewImpl ->page()->mainFrame()), document.get(), 0, FloatPoint(10, 9.5), FloatPoint(3.5, 2), FloatSize(4, 4.5), 0, 0); 465 RefPtrWillBeRawPtr<Touch> touch = Touch::create(toLocalFrame(webViewImpl ->page()->mainFrame()), document.get(), 0, FloatPoint(10, 9.5), FloatPoint(3.5, 2), FloatSize(4, 4.5), 0, 0);
463 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create(); 466 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create();
464 touchList->append(touch); 467 touchList->append(touch);
465 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchmove, domWindow, false, false, false, false, false, false); 468 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList .get(), touchList.get(), touchList.get(), EventTypeNames::touchmove, domWindow, InputDevice::touchEventInstance(), false, false, false, false, false, false);
466 469
467 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); 470 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent);
468 ASSERT_EQ(1u, webTouchBuilder.touchesLength); 471 ASSERT_EQ(1u, webTouchBuilder.touchesLength);
469 EXPECT_EQ(10, webTouchBuilder.touches[0].screenPosition.x); 472 EXPECT_EQ(10, webTouchBuilder.touches[0].screenPosition.x);
470 EXPECT_FLOAT_EQ(9.5, webTouchBuilder.touches[0].screenPosition.y); 473 EXPECT_FLOAT_EQ(9.5, webTouchBuilder.touches[0].screenPosition.y);
471 EXPECT_FLOAT_EQ(3.5, webTouchBuilder.touches[0].position.x); 474 EXPECT_FLOAT_EQ(3.5, webTouchBuilder.touches[0].position.x);
472 EXPECT_FLOAT_EQ(2, webTouchBuilder.touches[0].position.y); 475 EXPECT_FLOAT_EQ(2, webTouchBuilder.touches[0].position.y);
473 EXPECT_FLOAT_EQ(4, webTouchBuilder.touches[0].radiusX); 476 EXPECT_FLOAT_EQ(4, webTouchBuilder.touches[0].radiusX);
474 EXPECT_FLOAT_EQ(4.5, webTouchBuilder.touches[0].radiusY); 477 EXPECT_FLOAT_EQ(4.5, webTouchBuilder.touches[0].radiusY);
475 EXPECT_FALSE(webTouchBuilder.cancelable); 478 EXPECT_FALSE(webTouchBuilder.cancelable);
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 EXPECT_EQ(15, platformWheelBuilder.deltaX()); 937 EXPECT_EQ(15, platformWheelBuilder.deltaX());
935 EXPECT_EQ(10, platformWheelBuilder.deltaY()); 938 EXPECT_EQ(10, platformWheelBuilder.deltaY());
936 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.modifiers()); 939 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.modifiers());
937 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); 940 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas());
938 EXPECT_FALSE(platformWheelBuilder.canScroll()); 941 EXPECT_FALSE(platformWheelBuilder.canScroll());
939 EXPECT_EQ(platformWheelBuilder.railsMode(), PlatformEvent::RailsModeVert ical); 942 EXPECT_EQ(platformWheelBuilder.railsMode(), PlatformEvent::RailsModeVert ical);
940 } 943 }
941 } 944 }
942 945
943 } // anonymous namespace 946 } // anonymous namespace
OLDNEW
« Source/core/core.gypi ('K') | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698