Lines Matching refs:mapper

128 static void assertAxisResolution(MultiTouchInputMapper& mapper, int axis, float resolution) {  in assertAxisResolution()  argument
130 mapper.populateDeviceInfo(info); in assertAxisResolution()
137 static void assertAxisNotPresent(MultiTouchInputMapper& mapper, int axis) { in assertAxisNotPresent() argument
139 mapper.populateDeviceInfo(info); in assertAxisNotPresent()
650 FakeInputMapper& mapper = in addDeviceWithFakeInputMapper() local
655 return mapper; in addDeviceWithFakeInputMapper()
791 FakeInputMapper& mapper = in TEST_F() local
794 mapper.setKeyCodeState(AKEYCODE_A, AKEY_STATE_DOWN); in TEST_F()
823 FakeInputMapper& mapper = addDeviceWithFakeInputMapper(deviceId, eventHubId, "keyboard", in TEST_F() local
826 mapper.addKeyCodeMapping(AKEYCODE_Y, AKEYCODE_Z); in TEST_F()
842 FakeInputMapper& mapper = addDeviceWithFakeInputMapper(deviceId, eventHubId, "joystick", in TEST_F() local
845 mapper.addKeyCodeMapping(AKEYCODE_Y, AKEYCODE_Z); in TEST_F()
855 FakeInputMapper& mapper = in TEST_F() local
858 mapper.setScanCodeState(KEY_A, AKEY_STATE_DOWN); in TEST_F()
888 FakeInputMapper& mapper = in TEST_F() local
891 mapper.setSwitchState(SW_LID, AKEY_STATE_DOWN); in TEST_F()
921 FakeInputMapper& mapper = in TEST_F() local
925 mapper.addSupportedKeyCode(AKEYCODE_A); in TEST_F()
926 mapper.addSupportedKeyCode(AKEYCODE_B); in TEST_F()
978 FakeInputMapper& mapper = in TEST_F() local
987 ASSERT_NO_FATAL_FAILURE(mapper.assertProcessWasCalled(&event)); in TEST_F()
1052 FakeInputMapper& mapper = in TEST_F() local
1078 ASSERT_NO_FATAL_FAILURE(mapper.assertConfigureWasCalled()); in TEST_F()
1279 FakeVibratorInputMapper& mapper = in TEST_F() local
1286 ASSERT_NO_FATAL_FAILURE(mapper.assertConfigureWasCalled()); in TEST_F()
1288 ASSERT_EQ(mapper.getVibratorIds().size(), 2U); in TEST_F()
2816 FakeInputMapper& mapper = in TEST_F() local
2822 mapper.setProcessResult({args1, args2, args3}); in TEST_F()
2844 FakeInputMapper& mapper = in TEST_F() local
2848 mapper.setProcessResult({args}); in TEST_F()
2863 FakeInputMapper& mapper = in TEST_F() local
2868 mapper.setProcessResult({args}); in TEST_F()
3008 FakeInputMapper& mapper = in TEST_F() local
3015 mapper.assertConfigureWasCalled(); in TEST_F()
3016 mapper.assertResetWasNotCalled(); in TEST_F()
3027 mapper.assertProcessWasCalled(); in TEST_F()
3034 mapper.assertProcessWasNotCalled(); in TEST_F()
3041 mapper.assertProcessWasNotCalled(); in TEST_F()
3049 mapper.assertProcessWasNotCalled(); in TEST_F()
3050 mapper.assertResetWasCalled(); in TEST_F()
3057 mapper.assertProcessWasCalled(); in TEST_F()
3067 SwitchInputMapper& mapper = constructAndAddMapper<SwitchInputMapper>(); in TEST_F() local
3069 ASSERT_EQ(uint32_t(AINPUT_SOURCE_SWITCH), mapper.getSources()); in TEST_F()
3073 SwitchInputMapper& mapper = constructAndAddMapper<SwitchInputMapper>(); in TEST_F() local
3076 ASSERT_EQ(1, mapper.getSwitchState(AINPUT_SOURCE_ANY, SW_LID)); in TEST_F()
3079 ASSERT_EQ(0, mapper.getSwitchState(AINPUT_SOURCE_ANY, SW_LID)); in TEST_F()
3083 SwitchInputMapper& mapper = constructAndAddMapper<SwitchInputMapper>(); in TEST_F() local
3085 out = process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_LID, 1); in TEST_F()
3087 out = process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_JACK_PHYSICAL_INSERT, 1); in TEST_F()
3089 out = process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_HEADPHONE_INSERT, 0); in TEST_F()
3091 out = process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3109 VibratorInputMapper& mapper = constructAndAddMapper<VibratorInputMapper>(); in TEST_F() local
3111 ASSERT_EQ(AINPUT_SOURCE_UNKNOWN, mapper.getSources()); in TEST_F()
3115 VibratorInputMapper& mapper = constructAndAddMapper<VibratorInputMapper>(); in TEST_F() local
3117 ASSERT_EQ(mapper.getVibratorIds().size(), 2U); in TEST_F()
3123 VibratorInputMapper& mapper = constructAndAddMapper<VibratorInputMapper>(); in TEST_F() local
3139 ASSERT_FALSE(mapper.isVibrating()); in TEST_F()
3141 std::list<NotifyArgs> out = mapper.vibrate(sequence, /*repeat=*/-1, VIBRATION_TOKEN); in TEST_F()
3142 ASSERT_TRUE(mapper.isVibrating()); in TEST_F()
3150 out = mapper.cancelVibrate(VIBRATION_TOKEN); in TEST_F()
3151 ASSERT_FALSE(mapper.isVibrating()); in TEST_F()
3248 SensorInputMapper& mapper = constructAndAddMapper<SensorInputMapper>(); in TEST_F() local
3250 ASSERT_EQ(static_cast<uint32_t>(AINPUT_SOURCE_SENSOR), mapper.getSources()); in TEST_F()
3256 SensorInputMapper& mapper = constructAndAddMapper<SensorInputMapper>(); in TEST_F() local
3258 ASSERT_TRUE(mapper.enableSensor(InputDeviceSensorType::ACCELEROMETER, in TEST_F()
3262 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, 20000); in TEST_F()
3263 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, -20000); in TEST_F()
3264 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Z, 40000); in TEST_F()
3265 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_TIMESTAMP, 1000); in TEST_F()
3266 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3280 mapper.flushSensor(InputDeviceSensorType::ACCELEROMETER); in TEST_F()
3286 SensorInputMapper& mapper = constructAndAddMapper<SensorInputMapper>(); in TEST_F() local
3288 ASSERT_TRUE(mapper.enableSensor(InputDeviceSensorType::GYROSCOPE, in TEST_F()
3292 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RX, 20000); in TEST_F()
3293 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RY, -20000); in TEST_F()
3294 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RZ, 40000); in TEST_F()
3295 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_TIMESTAMP, 1000); in TEST_F()
3296 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3310 mapper.flushSensor(InputDeviceSensorType::GYROSCOPE); in TEST_F()
3325 void testDPadKeyRotation(KeyboardInputMapper& mapper, int32_t originalScanCode,
3338 void KeyboardInputMapperTest::testDPadKeyRotation(KeyboardInputMapper& mapper, in testDPadKeyRotation() argument
3344 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, originalScanCode, 1); in testDPadKeyRotation()
3351 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, originalScanCode, 0); in testDPadKeyRotation()
3360 KeyboardInputMapper& mapper = in TEST_F() local
3363 ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, mapper.getSources()); in TEST_F()
3375 KeyboardInputMapper& mapper = in TEST_F() local
3378 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3381 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
3396 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
3410 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_A); in TEST_F()
3411 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, 0, 1); in TEST_F()
3425 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_A); in TEST_F()
3426 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, 0, 0); in TEST_F()
3440 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_UNKNOWN); in TEST_F()
3441 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UNKNOWN, 1); in TEST_F()
3455 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_UNKNOWN); in TEST_F()
3456 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_UNKNOWN, 0); in TEST_F()
3475 KeyboardInputMapper& mapper = in TEST_F() local
3479 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_A, 1); in TEST_F()
3485 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_A, 0); in TEST_F()
3496 KeyboardInputMapper& mapper = in TEST_F() local
3501 process(mapper, ARBITRARY_TIME, /*readTime=*/12, EV_KEY, KEY_HOME, 1); in TEST_F()
3506 process(mapper, ARBITRARY_TIME, /*readTime=*/15, EV_KEY, KEY_HOME, 1); in TEST_F()
3518 KeyboardInputMapper& mapper = in TEST_F() local
3522 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3525 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_LEFTSHIFT, 1); in TEST_F()
3529 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3533 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_A, 1); in TEST_F()
3536 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3539 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_KEY, KEY_A, 0); in TEST_F()
3542 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3545 process(mapper, ARBITRARY_TIME + 3, READ_TIME, EV_KEY, KEY_LEFTSHIFT, 0); in TEST_F()
3548 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3558 KeyboardInputMapper& mapper = in TEST_F() local
3562 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3564 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3566 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3568 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3579 KeyboardInputMapper& mapper = in TEST_F() local
3584 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP, DISPLAY_ID)); in TEST_F()
3585 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3587 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3589 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3595 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT, DISPLAY_ID)); in TEST_F()
3596 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3598 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3600 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3606 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_DOWN, DISPLAY_ID)); in TEST_F()
3607 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3609 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3611 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3617 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_RIGHT, DISPLAY_ID)); in TEST_F()
3618 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3620 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3622 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3630 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3638 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3650 KeyboardInputMapper& mapper = in TEST_F() local
3655 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3657 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3662 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3664 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3675 KeyboardInputMapper& mapper = in TEST_F() local
3684 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3686 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3694 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3696 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3702 KeyboardInputMapper& mapper = in TEST_F() local
3706 ASSERT_EQ(1, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
3709 ASSERT_EQ(0, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
3713 KeyboardInputMapper& mapper = in TEST_F() local
3717 ASSERT_EQ(AKEYCODE_Z, mapper.getKeyCodeForKeyLocation(AKEYCODE_Y)) in TEST_F()
3720 ASSERT_EQ(AKEYCODE_A, mapper.getKeyCodeForKeyLocation(AKEYCODE_A)) in TEST_F()
3725 KeyboardInputMapper& mapper = in TEST_F() local
3729 ASSERT_EQ(1, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
3732 ASSERT_EQ(0, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
3736 KeyboardInputMapper& mapper = in TEST_F() local
3742 ASSERT_TRUE(mapper.markSupportedKeyCodes(AINPUT_SOURCE_ANY, {AKEYCODE_A, AKEYCODE_B}, flags)); in TEST_F()
3755 KeyboardInputMapper& mapper = in TEST_F() local
3758 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3766 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3767 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3771 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
3774 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3775 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3779 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3782 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3783 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3787 ASSERT_EQ(AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3790 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
3791 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
3795 ASSERT_EQ(AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
3798 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3799 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3803 ASSERT_EQ(AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
3806 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
3807 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
3811 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3820 KeyboardInputMapper& mapper = in TEST_F() local
3824 std::list<NotifyArgs> unused = mapper.reset(ARBITRARY_TIME); in TEST_F()
3825 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3827 mapper.updateMetaState(AKEYCODE_NUM_LOCK); in TEST_F()
3828 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3832 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_A, 1); in TEST_F()
3835 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3840 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_KEY, BTN_A, 0); in TEST_F()
3843 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3869 KeyboardInputMapper& mapper = in TEST_F() local
3912 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP, DISPLAY_ID)); in TEST_F()
3913 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3915 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3917 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3938 KeyboardInputMapper& mapper = in TEST_F() local
3941 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3949 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3950 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3952 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
3955 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3956 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3958 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3961 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
3962 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
3964 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
4009 KeyboardInputMapper& mapper = in TEST_F() local
4012 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
4015 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
4105 KeyboardInputMapper& mapper = in TEST_F() local
4108 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
4172 KeyboardInputMapper& mapper = in TEST_F() local
4177 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_LEFT, 1); in TEST_F()
4211 KeyboardInputMapper& mapper = in TEST_F() local
4214 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
4219 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
4223 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAY, 1); in TEST_F()
4227 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAY, 0); in TEST_F()
4231 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 1); in TEST_F()
4235 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 0); in TEST_F()
4248 KeyboardInputMapper& mapper = in TEST_F() local
4251 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAY, 1); in TEST_F()
4256 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAY, 0); in TEST_F()
4260 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 1); in TEST_F()
4264 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 0); in TEST_F()
4277 KeyboardInputMapper& mapper = in TEST_F() local
4280 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
4285 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
4289 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_DOWN, 1); in TEST_F()
4293 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_DOWN, 0); in TEST_F()
4297 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAY, 1); in TEST_F()
4301 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAY, 0); in TEST_F()
4490 void processDown(SingleTouchInputMapper& mapper, int32_t x, int32_t y);
4491 void processMove(SingleTouchInputMapper& mapper, int32_t x, int32_t y);
4493 void processPressure(SingleTouchInputMapper& mapper, int32_t pressure);
4494 void processToolMajor(SingleTouchInputMapper& mapper, int32_t toolMajor);
4495 void processDistance(SingleTouchInputMapper& mapper, int32_t distance);
4496 void processTilt(SingleTouchInputMapper& mapper, int32_t tiltX, int32_t tiltY);
4497 void processKey(SingleTouchInputMapper& mapper, int32_t code, int32_t value);
4498 void processSync(SingleTouchInputMapper& mapper);
4528 void SingleTouchInputMapperTest::processDown(SingleTouchInputMapper& mapper, int32_t x, int32_t y) { in processDown() argument
4529 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 1); in processDown()
4530 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, x); in processDown()
4531 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, y); in processDown()
4534 void SingleTouchInputMapperTest::processMove(SingleTouchInputMapper& mapper, int32_t x, int32_t y) { in processMove() argument
4535 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, x); in processMove()
4536 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, y); in processMove()
4539 void SingleTouchInputMapperTest::processUp(SingleTouchInputMapper& mapper) { in processUp() argument
4540 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 0); in processUp()
4543 void SingleTouchInputMapperTest::processPressure(SingleTouchInputMapper& mapper, int32_t pressure) { in processPressure() argument
4544 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_PRESSURE, pressure); in processPressure()
4547 void SingleTouchInputMapperTest::processToolMajor(SingleTouchInputMapper& mapper, in processToolMajor() argument
4549 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TOOL_WIDTH, toolMajor); in processToolMajor()
4552 void SingleTouchInputMapperTest::processDistance(SingleTouchInputMapper& mapper, int32_t distance) { in processDistance() argument
4553 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_DISTANCE, distance); in processDistance()
4556 void SingleTouchInputMapperTest::processTilt(SingleTouchInputMapper& mapper, int32_t tiltX, in processTilt() argument
4558 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TILT_X, tiltX); in processTilt()
4559 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TILT_Y, tiltY); in processTilt()
4562 void SingleTouchInputMapperTest::processKey(SingleTouchInputMapper& mapper, int32_t code, in processKey() argument
4564 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, code, value); in processKey()
4567 void SingleTouchInputMapperTest::processSync(SingleTouchInputMapper& mapper) { in processSync() argument
4568 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in processSync()
4574 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4576 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
4583 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4585 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
4594 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4597 ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
4602 processDown(mapper, x, y); in TEST_F()
4603 processSync(mapper); in TEST_F()
4606 ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME)); in TEST_F()
4609 processUp(mapper); in TEST_F()
4610 processSync(mapper); in TEST_F()
4613 ASSERT_EQ(AKEY_STATE_UP, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME)); in TEST_F()
4622 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4625 ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
4630 processDown(mapper, x, y); in TEST_F()
4631 processSync(mapper); in TEST_F()
4634 ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME)); in TEST_F()
4637 processUp(mapper); in TEST_F()
4638 processSync(mapper); in TEST_F()
4641 ASSERT_EQ(AKEY_STATE_UP, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME)); in TEST_F()
4650 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4654 mapper.markSupportedKeyCodes(AINPUT_SOURCE_ANY, {AKEYCODE_HOME, AKEYCODE_A}, flags)); in TEST_F()
4665 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4674 processDown(mapper, x, y); in TEST_F()
4675 processSync(mapper); in TEST_F()
4690 processUp(mapper); in TEST_F()
4691 processSync(mapper); in TEST_F()
4715 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4724 processDown(mapper, x, y); in TEST_F()
4725 processSync(mapper); in TEST_F()
4742 processMove(mapper, x, y); in TEST_F()
4743 processSync(mapper); in TEST_F()
4780 processMove(mapper, x, y); in TEST_F()
4781 processSync(mapper); in TEST_F()
4803 processUp(mapper); in TEST_F()
4804 processSync(mapper); in TEST_F()
4836 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4845 processDown(mapper, x, y); in TEST_F()
4846 processSync(mapper); in TEST_F()
4853 processMove(mapper, x, y); in TEST_F()
4854 processSync(mapper); in TEST_F()
4876 processUp(mapper); in TEST_F()
4877 processSync(mapper); in TEST_F()
4911 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
4920 processDown(mapper, x, y); in TEST_F()
4921 processSync(mapper); in TEST_F()
4947 processMove(mapper, x, y); in TEST_F()
4948 processSync(mapper); in TEST_F()
4972 processUp(mapper); in TEST_F()
4973 processSync(mapper); in TEST_F()
5007 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5016 processDown(mapper, x, y); in TEST_F()
5017 processSync(mapper); in TEST_F()
5041 processMove(mapper, x, y); in TEST_F()
5042 processSync(mapper); in TEST_F()
5064 processUp(mapper); in TEST_F()
5065 processSync(mapper); in TEST_F()
5097 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5103 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5104 processSync(mapper); in TEST_F()
5110 processUp(mapper); in TEST_F()
5111 processSync(mapper); in TEST_F()
5122 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5129 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5130 processSync(mapper); in TEST_F()
5136 processUp(mapper); in TEST_F()
5137 processSync(mapper); in TEST_F()
5143 processDown(mapper, toRotatedRawX(75), RAW_Y_MAX - toRotatedRawY(50) + RAW_Y_MIN); in TEST_F()
5144 processSync(mapper); in TEST_F()
5150 processUp(mapper); in TEST_F()
5151 processSync(mapper); in TEST_F()
5157 processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN); in TEST_F()
5158 processSync(mapper); in TEST_F()
5164 processUp(mapper); in TEST_F()
5165 processSync(mapper); in TEST_F()
5171 processDown(mapper, RAW_X_MAX - toRotatedRawX(75) + RAW_X_MIN, toRotatedRawY(50)); in TEST_F()
5172 processSync(mapper); in TEST_F()
5178 processUp(mapper); in TEST_F()
5179 processSync(mapper); in TEST_F()
5191 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5195 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5196 processSync(mapper); in TEST_F()
5202 processUp(mapper); in TEST_F()
5203 processSync(mapper); in TEST_F()
5215 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5219 processDown(mapper, RAW_X_MAX - toRotatedRawX(75) + RAW_X_MIN, toRotatedRawY(50)); in TEST_F()
5220 processSync(mapper); in TEST_F()
5226 processUp(mapper); in TEST_F()
5227 processSync(mapper); in TEST_F()
5239 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5243 processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN); in TEST_F()
5244 processSync(mapper); in TEST_F()
5250 processUp(mapper); in TEST_F()
5251 processSync(mapper); in TEST_F()
5263 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5267 processDown(mapper, toRotatedRawX(75), RAW_Y_MAX - toRotatedRawY(50) + RAW_Y_MIN); in TEST_F()
5268 processSync(mapper); in TEST_F()
5274 processUp(mapper); in TEST_F()
5275 processSync(mapper); in TEST_F()
5287 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5294 processDown(mapper, RAW_X_MAX - toRotatedRawX(75) + RAW_X_MIN, toRotatedRawY(50)); in TEST_F()
5295 processSync(mapper); in TEST_F()
5301 processUp(mapper); in TEST_F()
5302 processSync(mapper); in TEST_F()
5308 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5309 processSync(mapper); in TEST_F()
5315 processUp(mapper); in TEST_F()
5316 processSync(mapper); in TEST_F()
5322 processDown(mapper, toRotatedRawX(75), RAW_Y_MAX - toRotatedRawY(50) + RAW_Y_MIN); in TEST_F()
5323 processSync(mapper); in TEST_F()
5329 processUp(mapper); in TEST_F()
5330 processSync(mapper); in TEST_F()
5336 processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN); in TEST_F()
5337 processSync(mapper); in TEST_F()
5343 processUp(mapper); in TEST_F()
5344 processSync(mapper); in TEST_F()
5354 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5366 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 1); in TEST_F()
5367 processSync(mapper); in TEST_F()
5373 processMove(mapper, toRawX(p.x), toRawY(p.y)); in TEST_F()
5374 processSync(mapper); in TEST_F()
5379 processMove(mapper, toRawX(25), toRawY(605)); in TEST_F()
5380 processSync(mapper); in TEST_F()
5389 processMove(mapper, toRawX(p.x), toRawY(p.y)); in TEST_F()
5390 processSync(mapper); in TEST_F()
5397 processUp(mapper); in TEST_F()
5398 processSync(mapper); in TEST_F()
5407 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5419 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 1); in TEST_F()
5420 processSync(mapper); in TEST_F()
5427 processMove(mapper, toRawX(p.x), toRawY(p.y)); in TEST_F()
5428 processSync(mapper); in TEST_F()
5438 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5463 processDown(mapper, rawX, rawY); in TEST_F()
5464 processPressure(mapper, rawPressure); in TEST_F()
5465 processToolMajor(mapper, rawToolMajor); in TEST_F()
5466 processDistance(mapper, rawDistance); in TEST_F()
5467 processTilt(mapper, rawTiltX, rawTiltY); in TEST_F()
5468 processSync(mapper); in TEST_F()
5486 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5494 processDown(mapper, rawX, rawY); in TEST_F()
5495 processSync(mapper); in TEST_F()
5508 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5513 processDown(mapper, 100, 200); in TEST_F()
5514 processSync(mapper); in TEST_F()
5520 processKey(mapper, BTN_LEFT, 1); in TEST_F()
5521 processSync(mapper); in TEST_F()
5530 processKey(mapper, BTN_LEFT, 0); in TEST_F()
5531 processSync(mapper); in TEST_F()
5541 processKey(mapper, BTN_RIGHT, 1); in TEST_F()
5542 processKey(mapper, BTN_MIDDLE, 1); in TEST_F()
5543 processSync(mapper); in TEST_F()
5558 processKey(mapper, BTN_RIGHT, 0); in TEST_F()
5559 processSync(mapper); in TEST_F()
5568 processKey(mapper, BTN_MIDDLE, 0); in TEST_F()
5569 processSync(mapper); in TEST_F()
5579 processKey(mapper, BTN_BACK, 1); in TEST_F()
5580 processSync(mapper); in TEST_F()
5593 processKey(mapper, BTN_BACK, 0); in TEST_F()
5594 processSync(mapper); in TEST_F()
5608 processKey(mapper, BTN_SIDE, 1); in TEST_F()
5609 processSync(mapper); in TEST_F()
5622 processKey(mapper, BTN_SIDE, 0); in TEST_F()
5623 processSync(mapper); in TEST_F()
5637 processKey(mapper, BTN_FORWARD, 1); in TEST_F()
5638 processSync(mapper); in TEST_F()
5651 processKey(mapper, BTN_FORWARD, 0); in TEST_F()
5652 processSync(mapper); in TEST_F()
5666 processKey(mapper, BTN_EXTRA, 1); in TEST_F()
5667 processSync(mapper); in TEST_F()
5680 processKey(mapper, BTN_EXTRA, 0); in TEST_F()
5681 processSync(mapper); in TEST_F()
5697 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
5698 processSync(mapper); in TEST_F()
5707 processKey(mapper, BTN_STYLUS, 0); in TEST_F()
5708 processSync(mapper); in TEST_F()
5718 processKey(mapper, BTN_STYLUS2, 1); in TEST_F()
5719 processSync(mapper); in TEST_F()
5728 processKey(mapper, BTN_STYLUS2, 0); in TEST_F()
5729 processSync(mapper); in TEST_F()
5739 processUp(mapper); in TEST_F()
5740 processSync(mapper); in TEST_F()
5751 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5756 processDown(mapper, 100, 200); in TEST_F()
5757 processSync(mapper); in TEST_F()
5763 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
5764 processSync(mapper); in TEST_F()
5770 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
5771 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
5772 processSync(mapper); in TEST_F()
5778 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
5779 processKey(mapper, BTN_TOOL_BRUSH, 1); in TEST_F()
5780 processSync(mapper); in TEST_F()
5786 processKey(mapper, BTN_TOOL_BRUSH, 0); in TEST_F()
5787 processKey(mapper, BTN_TOOL_PENCIL, 1); in TEST_F()
5788 processSync(mapper); in TEST_F()
5794 processKey(mapper, BTN_TOOL_PENCIL, 0); in TEST_F()
5795 processKey(mapper, BTN_TOOL_AIRBRUSH, 1); in TEST_F()
5796 processSync(mapper); in TEST_F()
5802 processKey(mapper, BTN_TOOL_AIRBRUSH, 0); in TEST_F()
5803 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
5804 processSync(mapper); in TEST_F()
5810 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
5811 processKey(mapper, BTN_TOOL_LENS, 1); in TEST_F()
5812 processSync(mapper); in TEST_F()
5818 processKey(mapper, BTN_TOOL_LENS, 0); in TEST_F()
5819 processKey(mapper, BTN_TOOL_DOUBLETAP, 1); in TEST_F()
5820 processSync(mapper); in TEST_F()
5826 processKey(mapper, BTN_TOOL_DOUBLETAP, 0); in TEST_F()
5827 processKey(mapper, BTN_TOOL_TRIPLETAP, 1); in TEST_F()
5828 processSync(mapper); in TEST_F()
5834 processKey(mapper, BTN_TOOL_TRIPLETAP, 0); in TEST_F()
5835 processKey(mapper, BTN_TOOL_QUADTAP, 1); in TEST_F()
5836 processSync(mapper); in TEST_F()
5842 processKey(mapper, BTN_TOOL_QUADTAP, 0); in TEST_F()
5843 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
5844 processSync(mapper); in TEST_F()
5850 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
5851 processSync(mapper); in TEST_F()
5857 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
5858 processSync(mapper); in TEST_F()
5864 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
5865 processSync(mapper); in TEST_F()
5871 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
5872 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
5873 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
5874 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
5875 processSync(mapper); in TEST_F()
5887 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5892 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
5893 processMove(mapper, 100, 200); in TEST_F()
5894 processSync(mapper); in TEST_F()
5906 processMove(mapper, 150, 250); in TEST_F()
5907 processSync(mapper); in TEST_F()
5914 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
5915 processSync(mapper); in TEST_F()
5927 processKey(mapper, BTN_TOUCH, 0); in TEST_F()
5928 processSync(mapper); in TEST_F()
5945 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
5946 processSync(mapper); in TEST_F()
5958 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
5963 processDown(mapper, 100, 200); in TEST_F()
5964 processPressure(mapper, 0); in TEST_F()
5965 processSync(mapper); in TEST_F()
5977 processMove(mapper, 150, 250); in TEST_F()
5978 processSync(mapper); in TEST_F()
5985 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
5986 processSync(mapper); in TEST_F()
5998 processPressure(mapper, 0); in TEST_F()
5999 processSync(mapper); in TEST_F()
6016 processUp(mapper); in TEST_F()
6017 processSync(mapper); in TEST_F()
6029 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6032 processDown(mapper, 100, 200); in TEST_F()
6033 processPressure(mapper, 1); in TEST_F()
6034 processSync(mapper); in TEST_F()
6039 resetMapper(mapper, ARBITRARY_TIME); in TEST_F()
6051 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6062 resetMapper(mapper, ARBITRARY_TIME); in TEST_F()
6066 processSync(mapper); in TEST_F()
6079 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6083 processDown(mapper, 100, 200); in TEST_F()
6084 processSync(mapper); in TEST_F()
6107 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6112 processDown(mapper, 100, 200); in TEST_F()
6113 processSync(mapper); in TEST_F()
6130 processMove(mapper, 101, 201); in TEST_F()
6131 processSync(mapper); in TEST_F()
6132 processUp(mapper); in TEST_F()
6133 processSync(mapper); in TEST_F()
6137 processDown(mapper, 300, 400); in TEST_F()
6141 processSync(mapper); in TEST_F()
6153 processSync(mapper); in TEST_F()
6167 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6171 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
6172 processSync(mapper); in TEST_F()
6175 processDown(mapper, 100, 200); in TEST_F()
6176 processSync(mapper); in TEST_F()
6190 processUp(mapper); in TEST_F()
6191 processSync(mapper); in TEST_F()
6208 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6212 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
6213 processSync(mapper); in TEST_F()
6216 processDown(mapper, 100, 200); in TEST_F()
6217 processSync(mapper); in TEST_F()
6222 processKey(mapper, BTN_STYLUS, 0); in TEST_F()
6223 processSync(mapper); in TEST_F()
6226 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
6227 processSync(mapper); in TEST_F()
6232 processUp(mapper); in TEST_F()
6233 processSync(mapper); in TEST_F()
6245 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6248 ASSERT_EQ(AINPUT_SOURCE_TOUCH_NAVIGATION, mapper.getSources()); in TEST_F()
6257 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6260 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
6291 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6294 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
6295 processMove(mapper, RAW_X_MIN + 1, RAW_Y_MIN + 1); in TEST_F()
6296 processSync(mapper); in TEST_F()
6303 processMove(mapper, RAW_X_MAX - 1, RAW_Y_MAX - 1); in TEST_F()
6304 processSync(mapper); in TEST_F()
6309 processMove(mapper, RAW_X_MAX - 2, RAW_Y_MAX - 2); in TEST_F()
6310 processSync(mapper); in TEST_F()
6314 processMove(mapper, RAW_X_MIN, RAW_Y_MIN); in TEST_F()
6315 processSync(mapper); in TEST_F()
6397 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6415 processDown(mapper, toRawX(point.x), toRawY(point.y)); in TEST_F()
6416 processSync(mapper); in TEST_F()
6417 processUp(mapper); in TEST_F()
6418 processSync(mapper); in TEST_F()
6432 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_F() local
6448 processDown(mapper, toRawX(kOutsidePoint.x), toRawY(kOutsidePoint.y)); in TEST_F()
6449 processSync(mapper); in TEST_F()
6453 processMove(mapper, toRawX(11), toRawY(21)); in TEST_F()
6454 processSync(mapper); in TEST_F()
6462 processMove(mapper, toRawX(69), toRawY(159)); in TEST_F()
6463 processSync(mapper); in TEST_F()
6468 processMove(mapper, toRawX(kOutsidePoint.x), toRawY(kOutsidePoint.y)); in TEST_F()
6469 processSync(mapper); in TEST_F()
6473 processUp(mapper); in TEST_F()
6474 processSync(mapper); in TEST_F()
6561 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_P() local
6580 processDown(mapper, raw.x, raw.y); in TEST_P()
6581 processSync(mapper); in TEST_P()
6591 processUp(mapper); in TEST_P()
6592 processSync(mapper); in TEST_P()
6613 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_P() local
6621 processDown(mapper, raw.x, raw.y); in TEST_P()
6622 processSync(mapper); in TEST_P()
6629 processUp(mapper); in TEST_P()
6630 processSync(mapper); in TEST_P()
6651 SingleTouchInputMapper& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in TEST_P() local
6664 processDown(mapper, raw.x, raw.y); in TEST_P()
6665 processSync(mapper); in TEST_P()
6672 processUp(mapper); in TEST_P()
6673 processSync(mapper); in TEST_P()
6686 __attribute__((unused)) SingleTouchInputMapper& mapper = in TEST_P() local
6732 auto& mapper = constructAndAddMapper<SingleTouchInputMapper>(); in initializeInputMapperWithExternalStylus() local
6739 processExternalStylusState(mapper); in initializeInputMapperWithExternalStylus()
6740 return mapper; in initializeInputMapperWithExternalStylus()
6743 std::list<NotifyArgs> processExternalStylusState(InputMapper& mapper) { in processExternalStylusState() argument
6744 std::list<NotifyArgs> generatedArgs = mapper.updateExternalStylusState(mStylusState); in processExternalStylusState()
6756 void testStartFusedStylusGesture(SingleTouchInputMapper& mapper) { in testStartFusedStylusGesture() argument
6761 processDown(mapper, 100, 200); in testStartFusedStylusGesture()
6762 processSync(mapper); in testStartFusedStylusGesture()
6770 processExternalStylusState(mapper); in testStartFusedStylusGesture()
6776 processMove(mapper, 101, 201); in testStartFusedStylusGesture()
6777 processSync(mapper); in testStartFusedStylusGesture()
6785 void testSuccessfulFusionGesture(SingleTouchInputMapper& mapper) { in testSuccessfulFusionGesture() argument
6786 ASSERT_NO_FATAL_FAILURE(testStartFusedStylusGesture(mapper)); in testSuccessfulFusionGesture()
6789 processUp(mapper); in testSuccessfulFusionGesture()
6790 processSync(mapper); in testSuccessfulFusionGesture()
6796 processExternalStylusState(mapper); in testSuccessfulFusionGesture()
6801 void testUnsuccessfulFusionGesture(SingleTouchInputMapper& mapper) { in testUnsuccessfulFusionGesture() argument
6809 processDown(mapper, 100, 200); in testUnsuccessfulFusionGesture()
6810 processSync(mapper); in testUnsuccessfulFusionGesture()
6816 handleTimeout(mapper, ARBITRARY_TIME + 1); in testUnsuccessfulFusionGesture()
6821 handleTimeout(mapper, ARBITRARY_TIME + EXTERNAL_STYLUS_DATA_TIMEOUT); in testUnsuccessfulFusionGesture()
6826 processMove(mapper, 101, 201); in testUnsuccessfulFusionGesture()
6827 processSync(mapper); in testUnsuccessfulFusionGesture()
6830 processUp(mapper); in testUnsuccessfulFusionGesture()
6831 processSync(mapper); in testUnsuccessfulFusionGesture()
6844 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6845 ASSERT_EQ(STYLUS_FUSION_SOURCE, mapper.getSources()); in TEST_F()
6849 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6850 ASSERT_NO_FATAL_FAILURE(testUnsuccessfulFusionGesture(mapper)); in TEST_F()
6854 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6855 ASSERT_NO_FATAL_FAILURE(testSuccessfulFusionGesture(mapper)); in TEST_F()
6861 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6866 processExternalStylusState(mapper); in TEST_F()
6871 processDown(mapper, 100, 200); in TEST_F()
6872 processSync(mapper); in TEST_F()
6877 processMove(mapper, 101, 201); in TEST_F()
6878 processSync(mapper); in TEST_F()
6881 processUp(mapper); in TEST_F()
6882 processSync(mapper); in TEST_F()
6891 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6893 ASSERT_NO_FATAL_FAILURE(testSuccessfulFusionGesture(mapper)); in TEST_F()
6894 ASSERT_NO_FATAL_FAILURE(testUnsuccessfulFusionGesture(mapper)); in TEST_F()
6896 ASSERT_NO_FATAL_FAILURE(testSuccessfulFusionGesture(mapper)); in TEST_F()
6897 ASSERT_NO_FATAL_FAILURE(testSuccessfulFusionGesture(mapper)); in TEST_F()
6898 ASSERT_NO_FATAL_FAILURE(testUnsuccessfulFusionGesture(mapper)); in TEST_F()
6899 ASSERT_NO_FATAL_FAILURE(testUnsuccessfulFusionGesture(mapper)); in TEST_F()
6903 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6907 processExternalStylusState(mapper); in TEST_F()
6908 processDown(mapper, 100, 200); in TEST_F()
6909 processSync(mapper); in TEST_F()
6917 processExternalStylusState(mapper); in TEST_F()
6923 processMove(mapper, 101, 201); in TEST_F()
6924 processSync(mapper); in TEST_F()
6932 processExternalStylusState(mapper); in TEST_F()
6939 handleTimeout(mapper, ARBITRARY_TIME + TOUCH_DATA_TIMEOUT); in TEST_F()
6947 processExternalStylusState(mapper); in TEST_F()
6951 processMove(mapper, 102, 202); in TEST_F()
6952 processSync(mapper); in TEST_F()
6956 processMove(mapper, 103, 203); in TEST_F()
6957 processSync(mapper); in TEST_F()
6962 processUp(mapper); in TEST_F()
6963 processSync(mapper); in TEST_F()
6973 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
6978 processExternalStylusState(mapper); in TEST_F()
6979 processDown(mapper, 100, 200); in TEST_F()
6980 processSync(mapper); in TEST_F()
6988 processExternalStylusState(mapper); in TEST_F()
6994 processMove(mapper, 101, 201); in TEST_F()
6995 processSync(mapper); in TEST_F()
7003 processExternalStylusState(mapper); in TEST_F()
7010 handleTimeout(mapper, ARBITRARY_TIME + TOUCH_DATA_TIMEOUT); in TEST_F()
7015 processUp(mapper); in TEST_F()
7016 processSync(mapper); in TEST_F()
7026 SingleTouchInputMapper& mapper = initializeInputMapperWithExternalStylus(); in TEST_F() local
7029 ASSERT_NO_FATAL_FAILURE(testStartFusedStylusGesture(mapper)); in TEST_F()
7033 processExternalStylusState(mapper); in TEST_F()
7038 processMove(mapper, 101, 201); in TEST_F()
7039 processSync(mapper); in TEST_F()
7050 processExternalStylusState(mapper); in TEST_F()
7057 handleTimeout(mapper, ARBITRARY_TIME + TOUCH_DATA_TIMEOUT); in TEST_F()
7065 processUp(mapper); in TEST_F()
7066 processSync(mapper); in TEST_F()
7080 void processPosition(MultiTouchInputMapper& mapper, int32_t x, int32_t y);
7081 void processTouchMajor(MultiTouchInputMapper& mapper, int32_t touchMajor);
7082 void processTouchMinor(MultiTouchInputMapper& mapper, int32_t touchMinor);
7083 void processToolMajor(MultiTouchInputMapper& mapper, int32_t toolMajor);
7084 void processToolMinor(MultiTouchInputMapper& mapper, int32_t toolMinor);
7085 void processOrientation(MultiTouchInputMapper& mapper, int32_t orientation);
7086 void processPressure(MultiTouchInputMapper& mapper, int32_t pressure);
7087 void processDistance(MultiTouchInputMapper& mapper, int32_t distance);
7088 void processId(MultiTouchInputMapper& mapper, int32_t id);
7089 void processSlot(MultiTouchInputMapper& mapper, int32_t slot);
7090 void processToolType(MultiTouchInputMapper& mapper, int32_t toolType);
7091 void processKey(MultiTouchInputMapper& mapper, int32_t code, int32_t value);
7092 void processHidUsage(MultiTouchInputMapper& mapper, int32_t usageCode, int32_t value);
7093 void processMTSync(MultiTouchInputMapper& mapper);
7094 void processSync(MultiTouchInputMapper& mapper, nsecs_t eventTime = ARBITRARY_TIME,
7144 void MultiTouchInputMapperTest::processPosition(MultiTouchInputMapper& mapper, int32_t x, in processPosition() argument
7146 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_POSITION_X, x); in processPosition()
7147 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_POSITION_Y, y); in processPosition()
7150 void MultiTouchInputMapperTest::processTouchMajor(MultiTouchInputMapper& mapper, in processTouchMajor() argument
7152 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOUCH_MAJOR, touchMajor); in processTouchMajor()
7155 void MultiTouchInputMapperTest::processTouchMinor(MultiTouchInputMapper& mapper, in processTouchMinor() argument
7157 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOUCH_MINOR, touchMinor); in processTouchMinor()
7160 void MultiTouchInputMapperTest::processToolMajor(MultiTouchInputMapper& mapper, int32_t toolMajor) { in processToolMajor() argument
7161 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_WIDTH_MAJOR, toolMajor); in processToolMajor()
7164 void MultiTouchInputMapperTest::processToolMinor(MultiTouchInputMapper& mapper, int32_t toolMinor) { in processToolMinor() argument
7165 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_WIDTH_MINOR, toolMinor); in processToolMinor()
7168 void MultiTouchInputMapperTest::processOrientation(MultiTouchInputMapper& mapper, in processOrientation() argument
7170 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_ORIENTATION, orientation); in processOrientation()
7173 void MultiTouchInputMapperTest::processPressure(MultiTouchInputMapper& mapper, int32_t pressure) { in processPressure() argument
7174 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_PRESSURE, pressure); in processPressure()
7177 void MultiTouchInputMapperTest::processDistance(MultiTouchInputMapper& mapper, int32_t distance) { in processDistance() argument
7178 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_DISTANCE, distance); in processDistance()
7181 void MultiTouchInputMapperTest::processId(MultiTouchInputMapper& mapper, int32_t id) { in processId() argument
7182 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TRACKING_ID, id); in processId()
7185 void MultiTouchInputMapperTest::processSlot(MultiTouchInputMapper& mapper, int32_t slot) { in processSlot() argument
7186 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_SLOT, slot); in processSlot()
7189 void MultiTouchInputMapperTest::processToolType(MultiTouchInputMapper& mapper, int32_t toolType) { in processToolType() argument
7190 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOOL_TYPE, toolType); in processToolType()
7193 void MultiTouchInputMapperTest::processKey(MultiTouchInputMapper& mapper, int32_t code, in processKey() argument
7195 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, code, value); in processKey()
7198 void MultiTouchInputMapperTest::processHidUsage(MultiTouchInputMapper& mapper, int32_t usageCode, in processHidUsage() argument
7200 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, usageCode); in processHidUsage()
7201 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UNKNOWN, value); in processHidUsage()
7204 void MultiTouchInputMapperTest::processMTSync(MultiTouchInputMapper& mapper) { in processMTSync() argument
7205 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_MT_REPORT, 0); in processMTSync()
7208 void MultiTouchInputMapperTest::processSync(MultiTouchInputMapper& mapper, nsecs_t eventTime, in processSync() argument
7210 process(mapper, eventTime, readTime, EV_SYN, SYN_REPORT, 0); in processSync()
7218 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7226 processPosition(mapper, x1, y1); in TEST_F()
7227 processMTSync(mapper); in TEST_F()
7228 processPosition(mapper, x2, y2); in TEST_F()
7229 processMTSync(mapper); in TEST_F()
7230 processSync(mapper); in TEST_F()
7276 processPosition(mapper, x1, y1); in TEST_F()
7277 processMTSync(mapper); in TEST_F()
7278 processPosition(mapper, x2, y2); in TEST_F()
7279 processMTSync(mapper); in TEST_F()
7280 processSync(mapper); in TEST_F()
7307 processPosition(mapper, x2, y2); in TEST_F()
7308 processMTSync(mapper); in TEST_F()
7309 processSync(mapper); in TEST_F()
7355 processPosition(mapper, x2, y2); in TEST_F()
7356 processMTSync(mapper); in TEST_F()
7357 processSync(mapper); in TEST_F()
7380 processPosition(mapper, x2, y2); in TEST_F()
7381 processMTSync(mapper); in TEST_F()
7382 processPosition(mapper, x3, y3); in TEST_F()
7383 processMTSync(mapper); in TEST_F()
7384 processSync(mapper); in TEST_F()
7411 processPosition(mapper, x3, y3); in TEST_F()
7412 processMTSync(mapper); in TEST_F()
7413 processSync(mapper); in TEST_F()
7458 processMTSync(mapper); in TEST_F()
7459 processSync(mapper); in TEST_F()
7502 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7505 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_X, 10 / X_PRECISION); in TEST_F()
7506 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_Y, 11 / Y_PRECISION); in TEST_F()
7508 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOUCH_MAJOR, 12 * GEOMETRIC_SCALE); in TEST_F()
7509 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOUCH_MINOR, 13 * GEOMETRIC_SCALE); in TEST_F()
7511 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOOL_MAJOR, 14 * GEOMETRIC_SCALE); in TEST_F()
7512 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOOL_MINOR, 15 * GEOMETRIC_SCALE); in TEST_F()
7526 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7529 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOUCH_MAJOR); in TEST_F()
7530 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOUCH_MINOR); in TEST_F()
7532 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOOL_MAJOR); in TEST_F()
7533 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOOL_MINOR); in TEST_F()
7541 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7549 processPosition(mapper, x1, y1); in TEST_F()
7550 processId(mapper, 1); in TEST_F()
7551 processMTSync(mapper); in TEST_F()
7552 processPosition(mapper, x2, y2); in TEST_F()
7553 processId(mapper, 2); in TEST_F()
7554 processMTSync(mapper); in TEST_F()
7555 processSync(mapper); in TEST_F()
7579 processPosition(mapper, x1, y1); in TEST_F()
7580 processId(mapper, 1); in TEST_F()
7581 processMTSync(mapper); in TEST_F()
7582 processPosition(mapper, x2, y2); in TEST_F()
7583 processId(mapper, 2); in TEST_F()
7584 processMTSync(mapper); in TEST_F()
7585 processSync(mapper); in TEST_F()
7601 processPosition(mapper, x2, y2); in TEST_F()
7602 processId(mapper, 2); in TEST_F()
7603 processMTSync(mapper); in TEST_F()
7604 processSync(mapper); in TEST_F()
7628 processPosition(mapper, x2, y2); in TEST_F()
7629 processId(mapper, 2); in TEST_F()
7630 processMTSync(mapper); in TEST_F()
7631 processSync(mapper); in TEST_F()
7643 processPosition(mapper, x2, y2); in TEST_F()
7644 processId(mapper, 2); in TEST_F()
7645 processMTSync(mapper); in TEST_F()
7646 processPosition(mapper, x3, y3); in TEST_F()
7647 processId(mapper, 3); in TEST_F()
7648 processMTSync(mapper); in TEST_F()
7649 processSync(mapper); in TEST_F()
7665 processPosition(mapper, x3, y3); in TEST_F()
7666 processId(mapper, 3); in TEST_F()
7667 processMTSync(mapper); in TEST_F()
7668 processSync(mapper); in TEST_F()
7691 processMTSync(mapper); in TEST_F()
7692 processSync(mapper); in TEST_F()
7712 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7720 processPosition(mapper, x1, y1); in TEST_F()
7721 processId(mapper, 1); in TEST_F()
7722 processSlot(mapper, 1); in TEST_F()
7723 processPosition(mapper, x2, y2); in TEST_F()
7724 processId(mapper, 2); in TEST_F()
7725 processSync(mapper); in TEST_F()
7749 processSlot(mapper, 0); in TEST_F()
7750 processPosition(mapper, x1, y1); in TEST_F()
7751 processSlot(mapper, 1); in TEST_F()
7752 processPosition(mapper, x2, y2); in TEST_F()
7753 processSync(mapper); in TEST_F()
7769 processSlot(mapper, 0); in TEST_F()
7770 processId(mapper, -1); in TEST_F()
7771 processSlot(mapper, 1); in TEST_F()
7772 processPosition(mapper, x2, y2); in TEST_F()
7773 processSync(mapper); in TEST_F()
7797 processPosition(mapper, x2, y2); in TEST_F()
7798 processSync(mapper); in TEST_F()
7810 processPosition(mapper, x2, y2); in TEST_F()
7811 processSlot(mapper, 0); in TEST_F()
7812 processId(mapper, 3); in TEST_F()
7813 processPosition(mapper, x3, y3); in TEST_F()
7814 processSync(mapper); in TEST_F()
7830 processSlot(mapper, 1); in TEST_F()
7831 processId(mapper, -1); in TEST_F()
7832 processSlot(mapper, 0); in TEST_F()
7833 processPosition(mapper, x3, y3); in TEST_F()
7834 processSync(mapper); in TEST_F()
7857 processId(mapper, -1); in TEST_F()
7858 processSync(mapper); in TEST_F()
7877 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7902 processPosition(mapper, rawX, rawY); in TEST_F()
7903 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7904 processTouchMinor(mapper, rawTouchMinor); in TEST_F()
7905 processToolMajor(mapper, rawToolMajor); in TEST_F()
7906 processToolMinor(mapper, rawToolMinor); in TEST_F()
7907 processPressure(mapper, rawPressure); in TEST_F()
7908 processOrientation(mapper, rawOrientation); in TEST_F()
7909 processDistance(mapper, rawDistance); in TEST_F()
7910 processId(mapper, id); in TEST_F()
7911 processMTSync(mapper); in TEST_F()
7912 processSync(mapper); in TEST_F()
7928 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7946 processPosition(mapper, rawX, rawY); in TEST_F()
7947 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7948 processTouchMinor(mapper, rawTouchMinor); in TEST_F()
7949 processToolMajor(mapper, rawToolMajor); in TEST_F()
7950 processToolMinor(mapper, rawToolMinor); in TEST_F()
7951 processMTSync(mapper); in TEST_F()
7952 processSync(mapper); in TEST_F()
7968 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
7988 processPosition(mapper, rawX, rawY); in TEST_F()
7989 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7990 processToolMajor(mapper, rawToolMajor); in TEST_F()
7991 processMTSync(mapper); in TEST_F()
7992 processPosition(mapper, rawX2, rawY2); in TEST_F()
7993 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7994 processToolMajor(mapper, rawToolMajor); in TEST_F()
7995 processMTSync(mapper); in TEST_F()
7996 processSync(mapper); in TEST_F()
8018 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8032 processPosition(mapper, rawX, rawY); in TEST_F()
8033 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
8034 processToolMajor(mapper, rawToolMajor); in TEST_F()
8035 processMTSync(mapper); in TEST_F()
8036 processSync(mapper); in TEST_F()
8050 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8053 mapper.populateDeviceInfo(info); in TEST_F()
8067 processPosition(mapper, rawX, rawY); in TEST_F()
8068 processPressure(mapper, rawPressure); in TEST_F()
8069 processMTSync(mapper); in TEST_F()
8070 processSync(mapper); in TEST_F()
8082 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8087 processId(mapper, 1); in TEST_F()
8088 processPosition(mapper, 100, 200); in TEST_F()
8089 processSync(mapper); in TEST_F()
8095 processKey(mapper, BTN_LEFT, 1); in TEST_F()
8096 processSync(mapper); in TEST_F()
8105 processKey(mapper, BTN_LEFT, 0); in TEST_F()
8106 processSync(mapper); in TEST_F()
8116 processKey(mapper, BTN_RIGHT, 1); in TEST_F()
8117 processKey(mapper, BTN_MIDDLE, 1); in TEST_F()
8118 processSync(mapper); in TEST_F()
8133 processKey(mapper, BTN_RIGHT, 0); in TEST_F()
8134 processSync(mapper); in TEST_F()
8143 processKey(mapper, BTN_MIDDLE, 0); in TEST_F()
8144 processSync(mapper); in TEST_F()
8154 processKey(mapper, BTN_BACK, 1); in TEST_F()
8155 processSync(mapper); in TEST_F()
8168 processKey(mapper, BTN_BACK, 0); in TEST_F()
8169 processSync(mapper); in TEST_F()
8183 processKey(mapper, BTN_SIDE, 1); in TEST_F()
8184 processSync(mapper); in TEST_F()
8197 processKey(mapper, BTN_SIDE, 0); in TEST_F()
8198 processSync(mapper); in TEST_F()
8212 processKey(mapper, BTN_FORWARD, 1); in TEST_F()
8213 processSync(mapper); in TEST_F()
8226 processKey(mapper, BTN_FORWARD, 0); in TEST_F()
8227 processSync(mapper); in TEST_F()
8241 processKey(mapper, BTN_EXTRA, 1); in TEST_F()
8242 processSync(mapper); in TEST_F()
8255 processKey(mapper, BTN_EXTRA, 0); in TEST_F()
8256 processSync(mapper); in TEST_F()
8272 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
8273 processSync(mapper); in TEST_F()
8282 processKey(mapper, BTN_STYLUS, 0); in TEST_F()
8283 processSync(mapper); in TEST_F()
8293 processKey(mapper, BTN_STYLUS2, 1); in TEST_F()
8294 processSync(mapper); in TEST_F()
8303 processKey(mapper, BTN_STYLUS2, 0); in TEST_F()
8304 processSync(mapper); in TEST_F()
8314 processId(mapper, -1); in TEST_F()
8315 processSync(mapper); in TEST_F()
8325 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8331 processId(mapper, 1); in TEST_F()
8332 processPosition(mapper, 100, 200); in TEST_F()
8333 processSync(mapper); in TEST_F()
8338 processKey(mapper, BTN_A, 1); in TEST_F()
8339 processSync(mapper); in TEST_F()
8347 processKey(mapper, BTN_A, 0); in TEST_F()
8348 processSync(mapper); in TEST_F()
8355 processHidUsage(mapper, 0xabcd, 1); in TEST_F()
8356 processSync(mapper); in TEST_F()
8364 processHidUsage(mapper, 0xabcd, 0); in TEST_F()
8365 processSync(mapper); in TEST_F()
8372 processId(mapper, -1); in TEST_F()
8373 processSync(mapper); in TEST_F()
8382 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8387 processId(mapper, 1); in TEST_F()
8388 processPosition(mapper, 100, 200); in TEST_F()
8389 processSync(mapper); in TEST_F()
8395 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
8396 processSync(mapper); in TEST_F()
8402 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
8403 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
8404 processSync(mapper); in TEST_F()
8410 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
8411 processKey(mapper, BTN_TOOL_BRUSH, 1); in TEST_F()
8412 processSync(mapper); in TEST_F()
8418 processKey(mapper, BTN_TOOL_BRUSH, 0); in TEST_F()
8419 processKey(mapper, BTN_TOOL_PENCIL, 1); in TEST_F()
8420 processSync(mapper); in TEST_F()
8426 processKey(mapper, BTN_TOOL_PENCIL, 0); in TEST_F()
8427 processKey(mapper, BTN_TOOL_AIRBRUSH, 1); in TEST_F()
8428 processSync(mapper); in TEST_F()
8434 processKey(mapper, BTN_TOOL_AIRBRUSH, 0); in TEST_F()
8435 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
8436 processSync(mapper); in TEST_F()
8442 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
8443 processKey(mapper, BTN_TOOL_LENS, 1); in TEST_F()
8444 processSync(mapper); in TEST_F()
8450 processKey(mapper, BTN_TOOL_LENS, 0); in TEST_F()
8451 processKey(mapper, BTN_TOOL_DOUBLETAP, 1); in TEST_F()
8452 processSync(mapper); in TEST_F()
8458 processKey(mapper, BTN_TOOL_DOUBLETAP, 0); in TEST_F()
8459 processKey(mapper, BTN_TOOL_TRIPLETAP, 1); in TEST_F()
8460 processSync(mapper); in TEST_F()
8466 processKey(mapper, BTN_TOOL_TRIPLETAP, 0); in TEST_F()
8467 processKey(mapper, BTN_TOOL_QUADTAP, 1); in TEST_F()
8468 processSync(mapper); in TEST_F()
8474 processKey(mapper, BTN_TOOL_QUADTAP, 0); in TEST_F()
8475 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
8476 processSync(mapper); in TEST_F()
8482 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
8483 processSync(mapper); in TEST_F()
8489 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
8490 processSync(mapper); in TEST_F()
8496 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
8497 processSync(mapper); in TEST_F()
8503 processToolType(mapper, MT_TOOL_FINGER); // this is the first time we send MT_TOOL_TYPE in TEST_F()
8504 processSync(mapper); in TEST_F()
8510 processToolType(mapper, MT_TOOL_PEN); in TEST_F()
8511 processSync(mapper); in TEST_F()
8517 processToolType(mapper, -1); // use a deliberately undefined tool type, for testing in TEST_F()
8518 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
8519 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
8520 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
8521 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
8522 processSync(mapper); in TEST_F()
8533 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8538 processId(mapper, 1); in TEST_F()
8539 processPosition(mapper, 100, 200); in TEST_F()
8540 processSync(mapper); in TEST_F()
8552 processPosition(mapper, 150, 250); in TEST_F()
8553 processSync(mapper); in TEST_F()
8560 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
8561 processSync(mapper); in TEST_F()
8573 processKey(mapper, BTN_TOUCH, 0); in TEST_F()
8574 processSync(mapper); in TEST_F()
8591 processId(mapper, -1); in TEST_F()
8592 processSync(mapper); in TEST_F()
8603 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8608 processId(mapper, 1); in TEST_F()
8609 processPosition(mapper, 100, 200); in TEST_F()
8610 processPressure(mapper, 0); in TEST_F()
8611 processSync(mapper); in TEST_F()
8623 processPosition(mapper, 150, 250); in TEST_F()
8624 processSync(mapper); in TEST_F()
8631 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
8632 processSync(mapper); in TEST_F()
8644 processPressure(mapper, 0); in TEST_F()
8645 processSync(mapper); in TEST_F()
8662 processId(mapper, -1); in TEST_F()
8663 processSync(mapper); in TEST_F()
8684 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8696 processPosition(mapper, 100, 100); in TEST_F()
8697 processSync(mapper); in TEST_F()
8703 processPosition(mapper, 100, 100); in TEST_F()
8704 processSync(mapper); in TEST_F()
8714 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8722 processPosition(mapper, 100, 100); in TEST_F()
8723 processSync(mapper); in TEST_F()
8735 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8737 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
8740 processPosition(mapper, 100, 100); in TEST_F()
8741 processSync(mapper); in TEST_F()
8754 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8757 process(mapper, 10, /*readTime=*/11, EV_ABS, ABS_MT_TRACKING_ID, 1); in TEST_F()
8758 process(mapper, 15, /*readTime=*/16, EV_ABS, ABS_MT_POSITION_X, 100); in TEST_F()
8759 process(mapper, 20, /*readTime=*/21, EV_ABS, ABS_MT_POSITION_Y, 100); in TEST_F()
8760 process(mapper, 25, /*readTime=*/26, EV_SYN, SYN_REPORT, 0); in TEST_F()
8766 process(mapper, 30, /*readTime=*/31, EV_ABS, ABS_MT_POSITION_X, 110); in TEST_F()
8767 process(mapper, 30, /*readTime=*/32, EV_ABS, ABS_MT_POSITION_Y, 220); in TEST_F()
8768 process(mapper, 30, /*readTime=*/33, EV_SYN, SYN_REPORT, 0); in TEST_F()
8785 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8788 processPosition(mapper, 100, 100); in TEST_F()
8789 processSync(mapper); in TEST_F()
8805 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8808 processPosition(mapper, 100, 100); in TEST_F()
8809 processSync(mapper); in TEST_F()
8832 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8836 processPosition(mapper, x, y); in TEST_F()
8837 processSync(mapper); in TEST_F()
8854 processPosition(mapper, x, y); in TEST_F()
8855 processSync(mapper); in TEST_F()
8865 processPosition(mapper, x, y); in TEST_F()
8866 processSync(mapper); in TEST_F()
8888 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8892 processPosition(mapper, x, y); in TEST_F()
8893 processSync(mapper); in TEST_F()
8907 processPosition(mapper, x, y); in TEST_F()
8908 processSync(mapper); in TEST_F()
8919 processPosition(mapper, x, y); in TEST_F()
8920 processSync(mapper); in TEST_F()
8929 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8936 processPosition(mapper, 100, 200); in TEST_F()
8937 processSync(mapper); in TEST_F()
8944 processPosition(mapper, 200, 200); in TEST_F()
8945 processSync(mapper); in TEST_F()
8953 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8965 processPosition(mapper, 100, 200); in TEST_F()
8966 processSync(mapper); in TEST_F()
8978 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
8990 processPosition(mapper, 100, 200); in TEST_F()
8991 processSync(mapper); in TEST_F()
9001 processSync(mapper); in TEST_F()
9009 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9020 processPosition(mapper, 100, 200); in TEST_F()
9021 processSync(mapper); in TEST_F()
9032 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9043 processPosition(mapper, 100, 200); in TEST_F()
9044 processSync(mapper); in TEST_F()
9069 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9078 processPosition(mapper, 100, 100); in TEST_F()
9079 processSync(mapper); in TEST_F()
9090 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9096 processId(mapper, 1); in TEST_F()
9097 processPosition(mapper, x1, y1); in TEST_F()
9098 processSync(mapper); in TEST_F()
9104 processId(mapper, 1); in TEST_F()
9105 processPosition(mapper, x2, y2); in TEST_F()
9106 processSync(mapper); in TEST_F()
9112 processId(mapper, -1); in TEST_F()
9113 processSync(mapper); in TEST_F()
9119 processId(mapper, 1); in TEST_F()
9120 processPosition(mapper, x3, y3); in TEST_F()
9121 processSync(mapper); in TEST_F()
9135 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9141 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9142 processPosition(mapper, x1, y1); in TEST_F()
9143 processSync(mapper); in TEST_F()
9149 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9150 processSync(mapper); in TEST_F()
9155 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9156 processPosition(mapper, x2, y2); in TEST_F()
9157 processSync(mapper); in TEST_F()
9161 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9162 processSync(mapper); in TEST_F()
9166 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9167 processToolType(mapper, MT_TOOL_FINGER); in TEST_F()
9168 processPosition(mapper, x3, y3); in TEST_F()
9169 processSync(mapper); in TEST_F()
9183 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9189 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9190 processPosition(mapper, x1, y1); in TEST_F()
9191 processSync(mapper); in TEST_F()
9197 processSlot(mapper, SECOND_SLOT); in TEST_F()
9198 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9199 processPosition(mapper, x2, y2); in TEST_F()
9200 processSync(mapper); in TEST_F()
9207 processSlot(mapper, FIRST_SLOT); in TEST_F()
9208 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9209 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9210 processSync(mapper); in TEST_F()
9216 processSlot(mapper, SECOND_SLOT); in TEST_F()
9217 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9218 processPosition(mapper, x2 + 1, y2 + 1); in TEST_F()
9219 processSync(mapper); in TEST_F()
9226 processSlot(mapper, FIRST_SLOT); in TEST_F()
9227 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9228 processSync(mapper); in TEST_F()
9234 processSlot(mapper, SECOND_SLOT); in TEST_F()
9235 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9236 processPosition(mapper, x2 + 2, y2 + 2); in TEST_F()
9237 processSync(mapper); in TEST_F()
9243 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9244 processSync(mapper); in TEST_F()
9258 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9264 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9265 processPosition(mapper, x1, y1); in TEST_F()
9266 processSync(mapper); in TEST_F()
9272 processSlot(mapper, SECOND_SLOT); in TEST_F()
9273 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9274 processPosition(mapper, x2, y2); in TEST_F()
9275 processSync(mapper); in TEST_F()
9282 processSlot(mapper, FIRST_SLOT); in TEST_F()
9283 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9284 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9285 processSync(mapper); in TEST_F()
9291 processSlot(mapper, SECOND_SLOT); in TEST_F()
9292 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9293 processPosition(mapper, x2 + 1, y2 + 1); in TEST_F()
9294 processSync(mapper); in TEST_F()
9299 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9300 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9301 processSync(mapper); in TEST_F()
9306 processSlot(mapper, THIRD_SLOT); in TEST_F()
9307 processId(mapper, THIRD_TRACKING_ID); in TEST_F()
9308 processToolType(mapper, MT_TOOL_FINGER); in TEST_F()
9309 processPosition(mapper, x3, y3); in TEST_F()
9310 processSync(mapper); in TEST_F()
9317 processId(mapper, THIRD_TRACKING_ID); in TEST_F()
9318 processPosition(mapper, x3 + 1, y3 + 1); in TEST_F()
9319 processSync(mapper); in TEST_F()
9324 processSlot(mapper, FIRST_SLOT); in TEST_F()
9325 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9326 processSync(mapper); in TEST_F()
9332 processSlot(mapper, SECOND_SLOT); in TEST_F()
9333 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9334 processSync(mapper); in TEST_F()
9340 processSlot(mapper, THIRD_SLOT); in TEST_F()
9341 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9342 processSync(mapper); in TEST_F()
9356 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9362 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9363 processPosition(mapper, x1, y1); in TEST_F()
9364 processSync(mapper); in TEST_F()
9370 processSlot(mapper, SECOND_SLOT); in TEST_F()
9371 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9372 processPosition(mapper, x2, y2); in TEST_F()
9373 processSync(mapper); in TEST_F()
9380 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9381 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9382 processSync(mapper); in TEST_F()
9388 processSlot(mapper, FIRST_SLOT); in TEST_F()
9389 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9390 processPosition(mapper, x1 + 1, y1 + 1); in TEST_F()
9391 processSync(mapper); in TEST_F()
9397 processSlot(mapper, SECOND_SLOT); in TEST_F()
9398 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9399 processSync(mapper); in TEST_F()
9404 processSlot(mapper, FIRST_SLOT); in TEST_F()
9405 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9406 processPosition(mapper, x1 + 2, y1 + 2); in TEST_F()
9407 processSync(mapper); in TEST_F()
9412 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9413 processSync(mapper); in TEST_F()
9428 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9434 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9435 processPosition(mapper, x1, y1); in TEST_F()
9436 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9437 processSync(mapper); in TEST_F()
9443 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9444 processPosition(mapper, x1 + 1, y1 + 1); in TEST_F()
9445 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9446 processSync(mapper); in TEST_F()
9452 processSlot(mapper, SECOND_SLOT); in TEST_F()
9453 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9454 processPosition(mapper, x2, y2); in TEST_F()
9455 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9456 processSync(mapper); in TEST_F()
9462 processSlot(mapper, SECOND_SLOT); in TEST_F()
9463 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9464 processPosition(mapper, x2, y2); in TEST_F()
9465 processSync(mapper); in TEST_F()
9471 processSlot(mapper, FIRST_SLOT); in TEST_F()
9472 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9473 processPosition(mapper, x2, y2); in TEST_F()
9474 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9475 processSync(mapper); in TEST_F()
9485 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9489 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9490 processPosition(mapper, x1, y1); in TEST_F()
9491 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9492 processSync(mapper); in TEST_F()
9497 processSlot(mapper, SECOND_SLOT); in TEST_F()
9498 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9499 processPosition(mapper, x2, y2); in TEST_F()
9500 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9501 processSync(mapper); in TEST_F()
9525 resetMapper(mapper, ARBITRARY_TIME); in TEST_F()
9531 processPosition(mapper, 301, 302); in TEST_F()
9532 processSync(mapper); in TEST_F()
9545 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9548 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9549 processPosition(mapper, 100, 200); in TEST_F()
9550 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9551 processSync(mapper); in TEST_F()
9554 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9555 processSync(mapper); in TEST_F()
9561 resetMapper(mapper, ARBITRARY_TIME); in TEST_F()
9565 processSync(mapper); in TEST_F()
9573 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9580 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
9584 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9585 processToolType(mapper, MT_TOOL_PEN); in TEST_F()
9586 processPosition(mapper, 100, 200); in TEST_F()
9587 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9588 processSync(mapper); in TEST_F()
9596 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_STYLUS, mapper.getSources()); in TEST_F()
9609 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9610 processSync(mapper); in TEST_F()
9631 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9633 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
9639 processPosition(mapper, 100, 100); in TEST_F()
9640 processSync(mapper); in TEST_F()
9646 processPosition(mapper, 100, 100); in TEST_F()
9647 processSync(mapper); in TEST_F()
9661 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9664 processId(mapper, 3); in TEST_F()
9665 processPosition(mapper, 100, 100); in TEST_F()
9666 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
9667 processSync(mapper); in TEST_F()
9677 processPosition(mapper, 200, 200); in TEST_F()
9678 processSync(mapper); in TEST_F()
9693 processKey(mapper, BTN_LEFT, 1); in TEST_F()
9694 processSync(mapper); in TEST_F()
9703 processKey(mapper, BTN_LEFT, 0); in TEST_F()
9704 processSync(mapper); in TEST_F()
9718 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9721 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
9737 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9742 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9743 processPosition(mapper, 100, 200); in TEST_F()
9744 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9745 processSync(mapper, ARBITRARY_TIME); in TEST_F()
9756 processPosition(mapper, 101 + i, 201 + i); in TEST_F()
9757 processSync(mapper, kernelEventTime); in TEST_F()
9764 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9765 processPressure(mapper, RAW_PRESSURE_MIN); in TEST_F()
9766 processSync(mapper, ARBITRARY_TIME + ms2ns(50)); in TEST_F()
9819 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9827 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9828 processPosition(mapper, x1, y1); in TEST_F()
9829 processMTSync(mapper); in TEST_F()
9830 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9831 processPosition(mapper, x2, y2); in TEST_F()
9832 processMTSync(mapper); in TEST_F()
9833 processSync(mapper); in TEST_F()
9849 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9850 processPosition(mapper, x1, y1); in TEST_F()
9851 processMTSync(mapper); in TEST_F()
9852 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9853 processPosition(mapper, x2, y2); in TEST_F()
9854 processMTSync(mapper); in TEST_F()
9855 processSync(mapper); in TEST_F()
9879 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9887 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9888 processPosition(mapper, x1, y1); in TEST_F()
9889 processMTSync(mapper); in TEST_F()
9890 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9891 processPosition(mapper, x2, y2); in TEST_F()
9892 processMTSync(mapper); in TEST_F()
9893 processSync(mapper); in TEST_F()
9909 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9910 processPosition(mapper, x1, y1); in TEST_F()
9911 processMTSync(mapper); in TEST_F()
9912 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9913 processPosition(mapper, x2, y2); in TEST_F()
9914 processMTSync(mapper); in TEST_F()
9915 processSync(mapper); in TEST_F()
9935 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
9943 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9944 processPosition(mapper, x1, y1); in TEST_F()
9945 processMTSync(mapper); in TEST_F()
9946 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9947 processPosition(mapper, x2, y2); in TEST_F()
9948 processMTSync(mapper); in TEST_F()
9949 processSync(mapper); in TEST_F()
9967 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9968 processPosition(mapper, x1, y1); in TEST_F()
9969 processMTSync(mapper); in TEST_F()
9970 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9971 processPosition(mapper, x2, y2); in TEST_F()
9972 processMTSync(mapper); in TEST_F()
9973 processSync(mapper); in TEST_F()
10007 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
10008 processPosition(mapper, x1, y1); in TEST_F()
10009 processMTSync(mapper); in TEST_F()
10010 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
10011 processPosition(mapper, x2, y2); in TEST_F()
10012 processMTSync(mapper); in TEST_F()
10013 processSync(mapper); in TEST_F()
10030 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
10036 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
10037 processPosition(mapper, x1, y1); in TEST_F()
10038 processMTSync(mapper); in TEST_F()
10039 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
10040 processPosition(mapper, x2, y2); in TEST_F()
10041 processMTSync(mapper); in TEST_F()
10042 processSync(mapper); in TEST_F()
10058 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
10059 processPosition(mapper, x1, y1); in TEST_F()
10060 processMTSync(mapper); in TEST_F()
10061 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
10062 processPosition(mapper, x2, y2); in TEST_F()
10063 processMTSync(mapper); in TEST_F()
10064 processSync(mapper); in TEST_F()
10077 MultiTouchInputMapper& mapper = constructAndAddMapper<MultiTouchInputMapper>(); in TEST_F() local
10081 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
10082 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
10083 processPosition(mapper, 100, 200); in TEST_F()
10084 processSync(mapper); in TEST_F()
10131 void processAxis(JoystickInputMapper& mapper, int32_t axis, int32_t value) { in processAxis() argument
10132 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, axis, value); in processAxis()
10135 void processSync(JoystickInputMapper& mapper) { in processSync() argument
10136 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in processSync()
10153 JoystickInputMapper& mapper = constructAndAddMapper<JoystickInputMapper>(); in TEST_F() local
10160 processAxis(mapper, ABS_X, 100); in TEST_F()
10161 processSync(mapper); in TEST_F()
10168 processAxis(mapper, ABS_Y, 100); in TEST_F()
10169 processSync(mapper); in TEST_F()