OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |