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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEventFactoryTest.cpp

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Wrap ForwardTouchEventWithLatencyInfo to always reset points 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "core/events/PointerEventFactory.h" 5 #include "core/events/PointerEventFactory.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/page/Page.h" 8 #include "core/page/Page.h"
9 #include "public/platform/WebPointerProperties.h" 9 #include "public/platform/WebPointerProperties.h"
10 #include <climits> 10 #include <climits>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 state = stateParam; 89 state = stateParam;
90 } 90 }
91 91
92 PointerEventFactoryTest::WebMouseEventBuilder::WebMouseEventBuilder( 92 PointerEventFactoryTest::WebMouseEventBuilder::WebMouseEventBuilder(
93 WebPointerProperties::PointerType pointerTypeParam, 93 WebPointerProperties::PointerType pointerTypeParam,
94 int idParam, 94 int idParam,
95 PlatformEvent::Modifiers modifiersParam) { 95 PlatformEvent::Modifiers modifiersParam) {
96 pointerType = pointerTypeParam; 96 pointerType = pointerTypeParam;
97 id = idParam; 97 id = idParam;
98 m_modifiers = modifiersParam; 98 m_modifiers = modifiersParam;
99 m_frameScale = 1;
99 } 100 }
100 101
101 PointerEvent* PointerEventFactoryTest::createAndCheckTouchCancel( 102 PointerEvent* PointerEventFactoryTest::createAndCheckTouchCancel(
102 WebPointerProperties::PointerType pointerType, 103 WebPointerProperties::PointerType pointerType,
103 int rawId, 104 int rawId,
104 int uniqueId, 105 int uniqueId,
105 bool isPrimary) { 106 bool isPrimary) {
106 PointerEvent* pointerEvent = 107 PointerEvent* pointerEvent =
107 m_pointerEventFactory.createPointerCancelEvent(uniqueId, pointerType); 108 m_pointerEventFactory.createPointerCancelEvent(uniqueId, pointerType);
108 EXPECT_EQ(uniqueId, pointerEvent->pointerId()); 109 EXPECT_EQ(uniqueId, pointerEvent->pointerId());
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 445
445 TEST_F(PointerEventFactoryTest, CoalescedEvents) { 446 TEST_F(PointerEventFactoryTest, CoalescedEvents) {
446 createAndCheckMouseEvent(WebPointerProperties::PointerType::Mouse, 0, 447 createAndCheckMouseEvent(WebPointerProperties::PointerType::Mouse, 0,
447 m_expectedMouseId, true, PlatformEvent::NoModifiers, 448 m_expectedMouseId, true, PlatformEvent::NoModifiers,
448 4); 449 4);
449 createAndCheckTouchEvent(WebPointerProperties::PointerType::Touch, 0, 450 createAndCheckTouchEvent(WebPointerProperties::PointerType::Touch, 0,
450 m_mappedIdStart, true, WebTouchPoint::StateMoved, 3); 451 m_mappedIdStart, true, WebTouchPoint::StateMoved, 3);
451 } 452 }
452 453
453 } // namespace blink 454 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEventFactory.cpp ('k') | third_party/WebKit/Source/platform/WebTouchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698