| 20 | } |
| 21 | |
| 22 | TouchEvent createTouchEvent( |
| 23 | TouchEventType type, Scalar x, Scalar y, Scalar dx, Scalar dy, int pointerCount, Duration delay) { |
| 24 | static auto referencePoint = TimePoint::now(); |
| 25 | |
| 26 | // TODO(2835) - add support for these when they're used |
| 27 | TouchEvent::PointerLocations pointerLocations; |
| 28 | pointerLocations.push_back(Point::make(x, y)); |
| 29 | return TouchEvent(type, |
| 30 | Point::make(x, y), |
| 31 | Point::make(x, y), |
| 32 | Vector::make(dx, dy), |
| 33 | pointerCount, |
| 34 | 0, |
| 35 | std::move(pointerLocations), |
| 36 | referencePoint + delay, |
| 37 | Duration(), |
| 38 | nullptr); |
| 39 | } |
| 40 | |
| 41 | TestContainer::TestContainer(Rect size) { |
| 42 | root = makeRoot(); |
no test coverage detected