260 {
261 MotionEventMocker mocker =
262 new MotionEventMocker(1, InputDevice.SOURCE_MOUSE, MotionEvent.TOOL_TYPE_MOUSE);
265 inOrder
269 assertEquals(AndroidTouchProcessor.PointerChange.PAN_ZOOM_START, readPointerChange(packet));
270 assertEquals(AndroidTouchProcessor.PointerDeviceKind.TRACKPAD, readPointerDeviceKind(packet));
271 assertEquals(AndroidTouchProcessor.PointerSignalKind.NONE, readPointerSignalKind(packet));
272 assertEquals(0.0, readPointerPhysicalX(packet));
273 assertEquals(0.0, readPointerPhysicalY(packet));
275 inOrder
279 assertEquals(AndroidTouchProcessor.PointerChange.PAN_ZOOM_UPDATE, readPointerChange(packet));
280 assertEquals(AndroidTouchProcessor.PointerDeviceKind.TRACKPAD, readPointerDeviceKind(packet));
281 assertEquals(AndroidTouchProcessor.PointerSignalKind.NONE, readPointerSignalKind(packet));
282 assertEquals(0.0, readPointerPhysicalX(packet));
283 assertEquals(0.0, readPointerPhysicalY(packet));
284 assertEquals(10.0, readPointerPanX(packet));
285 assertEquals(5.0, readPointerPanY(packet));
286
287 assertEquals(0.0, readPointerPanDeltaX(packet));
288 assertEquals(0.0, readPointerPanDeltaY(packet));
289 assertEquals(0.0, readRotation(packet));
290
291 assertEquals(1.0, readScale(packet));
293 inOrder
297 assertEquals(AndroidTouchProcessor.PointerChange.PAN_ZOOM_END, readPointerChange(packet));
298 assertEquals(AndroidTouchProcessor.PointerDeviceKind.TRACKPAD, readPointerDeviceKind(packet));
299 assertEquals(AndroidTouchProcessor.PointerSignalKind.NONE, readPointerSignalKind(packet));
300 assertEquals(0.0, readPointerPhysicalX(packet));
301 assertEquals(0.0, readPointerPhysicalY(packet));
302 inOrder.verifyNoMoreInteractions();
303 }