| OLD | NEW |
| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].stat
e); | 212 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].stat
e); |
| 213 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].stat
e); | 213 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].stat
e); |
| 214 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); | 214 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); |
| 215 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); | 215 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); |
| 216 } | 216 } |
| 217 | 217 |
| 218 // Test max point limit. | 218 // Test max point limit. |
| 219 { | 219 { |
| 220 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create(); | 220 RefPtrWillBeRawPtr<TouchList> touchList = TouchList::create(); |
| 221 RefPtrWillBeRawPtr<TouchList> changedTouchList = TouchList::create(); | 221 RefPtrWillBeRawPtr<TouchList> changedTouchList = TouchList::create(); |
| 222 for (unsigned i = 0; i <= static_cast<unsigned>(WebTouchEvent::touchesLe
ngthCap) * 2; ++i) { | 222 for (int i = 0; i <= static_cast<int>(WebTouchEvent::touchesLengthCap) *
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); | 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); |
| 224 touchList->append(touch); | 224 touchList->append(touch); |
| 225 changedTouchList->append(touch); | 225 changedTouchList->append(touch); |
| 226 } | 226 } |
| 227 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList
.get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow,
false, false, false, false, false, false); | 227 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(touchList
.get(), touchList.get(), touchList.get(), EventTypeNames::touchstart, domWindow,
false, false, false, false, false, false); |
| 228 | 228 |
| 229 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 229 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 230 ASSERT_EQ(static_cast<unsigned>(WebTouchEvent::touchesLengthCap), webTou
chBuilder.touchesLength); | 230 ASSERT_EQ(static_cast<unsigned>(WebTouchEvent::touchesLengthCap), webTou
chBuilder.touchesLength); |
| 231 } | 231 } |
| 232 } | 232 } |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 EXPECT_EQ(15, platformWheelBuilder.deltaX()); | 934 EXPECT_EQ(15, platformWheelBuilder.deltaX()); |
| 935 EXPECT_EQ(10, platformWheelBuilder.deltaY()); | 935 EXPECT_EQ(10, platformWheelBuilder.deltaY()); |
| 936 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.modifiers()); | 936 EXPECT_EQ(PlatformEvent::AltKey, platformWheelBuilder.modifiers()); |
| 937 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); | 937 EXPECT_TRUE(platformWheelBuilder.hasPreciseScrollingDeltas()); |
| 938 EXPECT_FALSE(platformWheelBuilder.canScroll()); | 938 EXPECT_FALSE(platformWheelBuilder.canScroll()); |
| 939 EXPECT_EQ(platformWheelBuilder.railsMode(), PlatformEvent::RailsModeVert
ical); | 939 EXPECT_EQ(platformWheelBuilder.railsMode(), PlatformEvent::RailsModeVert
ical); |
| 940 } | 940 } |
| 941 } | 941 } |
| 942 | 942 |
| 943 } // anonymous namespace | 943 } // anonymous namespace |
| OLD | NEW |