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

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

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applying comments Created 4 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/PointerEventManager.h" 5 #include "core/events/PointerEventManager.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 m_expectedMouseId = 1; 45 m_expectedMouseId = 1;
46 m_mappedIdStart = 2; 46 m_mappedIdStart = 2;
47 47
48 } 48 }
49 49
50 PointerEventManagerTest::PlatformTouchPointBuilder::PlatformTouchPointBuilder( 50 PointerEventManagerTest::PlatformTouchPointBuilder::PlatformTouchPointBuilder(
51 WebPointerProperties::PointerType pointerType, int id) 51 WebPointerProperties::PointerType pointerType, int id)
52 { 52 {
53 m_pointerProperties.id = id; 53 m_pointerProperties.id = id;
54 m_pointerProperties.pointerType = pointerType; 54 m_pointerProperties.pointerType = pointerType;
55 m_pointerProperties.force = 1.0;
55 } 56 }
56 57
57 PointerEventManagerTest::PlatformMouseEventBuilder::PlatformMouseEventBuilder( 58 PointerEventManagerTest::PlatformMouseEventBuilder::PlatformMouseEventBuilder(
58 WebPointerProperties::PointerType pointerType, int id) 59 WebPointerProperties::PointerType pointerType, int id)
59 { 60 {
60 m_pointerProperties.pointerType = pointerType; 61 m_pointerProperties.pointerType = pointerType;
61 m_pointerProperties.id = id; 62 m_pointerProperties.id = id;
62 } 63 }
63 64
64 PassRefPtrWillBeRawPtr<PointerEvent> PointerEventManagerTest::createAndCheckTouc hCancel( 65 PassRefPtrWillBeRawPtr<PointerEvent> PointerEventManagerTest::createAndCheckTouc hCancel(
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 createAndCheckMouseEvent(WebPointerProperties::PointerType::Touch, i, m_ mappedIdStart+i, i == 0); 229 createAndCheckMouseEvent(WebPointerProperties::PointerType::Touch, i, m_ mappedIdStart+i, i == 0);
229 } 230 }
230 231
231 for (int i = 0; i < 100; ++i) { 232 for (int i = 0; i < 100; ++i) {
232 createAndCheckTouchEvent(WebPointerProperties::PointerType::Mouse, i, m_ expectedMouseId, true); 233 createAndCheckTouchEvent(WebPointerProperties::PointerType::Mouse, i, m_ expectedMouseId, true);
233 } 234 }
234 createAndCheckTouchCancel(WebPointerProperties::PointerType::Mouse, 0, m_exp ectedMouseId, true); 235 createAndCheckTouchCancel(WebPointerProperties::PointerType::Mouse, 0, m_exp ectedMouseId, true);
235 } 236 }
236 237
237 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerEventManager.cpp ('k') | third_party/WebKit/Source/platform/PlatformTouchPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698