Lines Matching refs:mapper
146 static void assertAxisResolution(MultiTouchInputMapper& mapper, int axis, float resolution) { in assertAxisResolution() argument
148 mapper.populateDeviceInfo(&info); in assertAxisResolution()
155 static void assertAxisNotPresent(MultiTouchInputMapper& mapper, int axis) { in assertAxisNotPresent() argument
157 mapper.populateDeviceInfo(&info); in assertAxisNotPresent()
1638 FakeInputMapper& mapper = device->addMapper<FakeInputMapper>(eventHubId, sources); in addDeviceWithFakeInputMapper() local
1641 return mapper; in addDeviceWithFakeInputMapper()
1748 FakeInputMapper& mapper = in TEST_F() local
1751 mapper.setKeyCodeState(AKEYCODE_A, AKEY_STATE_DOWN); in TEST_F()
1780 FakeInputMapper& mapper = addDeviceWithFakeInputMapper(deviceId, eventHubId, "keyboard", in TEST_F() local
1783 mapper.addKeyCodeMapping(AKEYCODE_Y, AKEYCODE_Z); in TEST_F()
1799 FakeInputMapper& mapper = addDeviceWithFakeInputMapper(deviceId, eventHubId, "joystick", in TEST_F() local
1802 mapper.addKeyCodeMapping(AKEYCODE_Y, AKEYCODE_Z); in TEST_F()
1812 FakeInputMapper& mapper = in TEST_F() local
1815 mapper.setScanCodeState(KEY_A, AKEY_STATE_DOWN); in TEST_F()
1845 FakeInputMapper& mapper = in TEST_F() local
1848 mapper.setSwitchState(SW_LID, AKEY_STATE_DOWN); in TEST_F()
1878 FakeInputMapper& mapper = in TEST_F() local
1882 mapper.addSupportedKeyCode(AKEYCODE_A); in TEST_F()
1883 mapper.addSupportedKeyCode(AKEYCODE_B); in TEST_F()
1932 FakeInputMapper& mapper = in TEST_F() local
1941 ASSERT_NO_FATAL_FAILURE(mapper.assertProcessWasCalled(&event)); in TEST_F()
2004 FakeInputMapper& mapper = in TEST_F() local
2030 ASSERT_NO_FATAL_FAILURE(mapper.assertConfigureWasCalled()); in TEST_F()
2148 FakeVibratorInputMapper& mapper = in TEST_F() local
2153 ASSERT_NO_FATAL_FAILURE(mapper.assertConfigureWasCalled()); in TEST_F()
2155 ASSERT_EQ(mapper.getVibratorIds().size(), 2U); in TEST_F()
3031 T& mapper = mDevice->addMapper<T>(EVENTHUB_ID, args...); in addMapperAndConfigure() local
3034 mapper.reset(ARBITRARY_TIME); in addMapperAndConfigure()
3037 return mapper; in addMapperAndConfigure()
3052 void process(InputMapper& mapper, nsecs_t when, nsecs_t readTime, int32_t type, int32_t code, in process() argument
3057 event.deviceId = mapper.getDeviceContext().getEventHubId(); in process()
3061 mapper.process(&event); in process()
3122 SwitchInputMapper& mapper = addMapperAndConfigure<SwitchInputMapper>(); in TEST_F() local
3124 ASSERT_EQ(uint32_t(AINPUT_SOURCE_SWITCH), mapper.getSources()); in TEST_F()
3128 SwitchInputMapper& mapper = addMapperAndConfigure<SwitchInputMapper>(); in TEST_F() local
3131 ASSERT_EQ(1, mapper.getSwitchState(AINPUT_SOURCE_ANY, SW_LID)); in TEST_F()
3134 ASSERT_EQ(0, mapper.getSwitchState(AINPUT_SOURCE_ANY, SW_LID)); in TEST_F()
3138 SwitchInputMapper& mapper = addMapperAndConfigure<SwitchInputMapper>(); in TEST_F() local
3140 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_LID, 1); in TEST_F()
3141 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_JACK_PHYSICAL_INSERT, 1); in TEST_F()
3142 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SW, SW_HEADPHONE_INSERT, 0); in TEST_F()
3143 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3161 VibratorInputMapper& mapper = addMapperAndConfigure<VibratorInputMapper>(); in TEST_F() local
3163 ASSERT_EQ(AINPUT_SOURCE_UNKNOWN, mapper.getSources()); in TEST_F()
3167 VibratorInputMapper& mapper = addMapperAndConfigure<VibratorInputMapper>(); in TEST_F() local
3169 ASSERT_EQ(mapper.getVibratorIds().size(), 2U); in TEST_F()
3175 VibratorInputMapper& mapper = addMapperAndConfigure<VibratorInputMapper>(); in TEST_F() local
3191 ASSERT_FALSE(mapper.isVibrating()); in TEST_F()
3193 mapper.vibrate(sequence, -1 /* repeat */, VIBRATION_TOKEN); in TEST_F()
3194 ASSERT_TRUE(mapper.isVibrating()); in TEST_F()
3202 mapper.cancelVibrate(VIBRATION_TOKEN); in TEST_F()
3203 ASSERT_FALSE(mapper.isVibrating()); in TEST_F()
3299 SensorInputMapper& mapper = addMapperAndConfigure<SensorInputMapper>(); in TEST_F() local
3301 ASSERT_EQ(static_cast<uint32_t>(AINPUT_SOURCE_SENSOR), mapper.getSources()); in TEST_F()
3307 SensorInputMapper& mapper = addMapperAndConfigure<SensorInputMapper>(); in TEST_F() local
3309 ASSERT_TRUE(mapper.enableSensor(InputDeviceSensorType::ACCELEROMETER, in TEST_F()
3313 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, 20000); in TEST_F()
3314 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, -20000); in TEST_F()
3315 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Z, 40000); in TEST_F()
3316 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_TIMESTAMP, 1000); in TEST_F()
3317 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3331 mapper.flushSensor(InputDeviceSensorType::ACCELEROMETER); in TEST_F()
3337 SensorInputMapper& mapper = addMapperAndConfigure<SensorInputMapper>(); in TEST_F() local
3339 ASSERT_TRUE(mapper.enableSensor(InputDeviceSensorType::GYROSCOPE, in TEST_F()
3343 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RX, 20000); in TEST_F()
3344 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RY, -20000); in TEST_F()
3345 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_RZ, 40000); in TEST_F()
3346 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_TIMESTAMP, 1000); in TEST_F()
3347 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
3361 mapper.flushSensor(InputDeviceSensorType::GYROSCOPE); in TEST_F()
3372 void testDPadKeyRotation(KeyboardInputMapper& mapper, int32_t originalScanCode,
3385 void KeyboardInputMapperTest::testDPadKeyRotation(KeyboardInputMapper& mapper, in testDPadKeyRotation() argument
3390 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, originalScanCode, 1); in testDPadKeyRotation()
3397 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, originalScanCode, 0); in testDPadKeyRotation()
3406 KeyboardInputMapper& mapper = in TEST_F() local
3410 ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, mapper.getSources()); in TEST_F()
3422 KeyboardInputMapper& mapper = in TEST_F() local
3426 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3429 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
3444 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
3458 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_A); in TEST_F()
3459 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, 0, 1); in TEST_F()
3473 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_A); in TEST_F()
3474 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, 0, 0); in TEST_F()
3488 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_UNKNOWN); in TEST_F()
3489 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UNKNOWN, 1); in TEST_F()
3503 process(mapper, ARBITRARY_TIME, READ_TIME, EV_MSC, MSC_SCAN, USAGE_UNKNOWN); in TEST_F()
3504 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_UNKNOWN, 0); in TEST_F()
3524 KeyboardInputMapper& mapper = in TEST_F() local
3530 process(mapper, ARBITRARY_TIME, 12 /*readTime*/, EV_KEY, KEY_HOME, 1); in TEST_F()
3535 process(mapper, ARBITRARY_TIME, 15 /*readTime*/, EV_KEY, KEY_HOME, 1); in TEST_F()
3547 KeyboardInputMapper& mapper = in TEST_F() local
3552 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3555 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_LEFTSHIFT, 1); in TEST_F()
3559 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3563 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_A, 1); in TEST_F()
3566 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3569 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_KEY, KEY_A, 0); in TEST_F()
3572 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper.getMetaState()); in TEST_F()
3575 process(mapper, ARBITRARY_TIME + 3, READ_TIME, EV_KEY, KEY_LEFTSHIFT, 0); in TEST_F()
3578 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3588 KeyboardInputMapper& mapper = in TEST_F() local
3593 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3595 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3597 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3599 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, in TEST_F()
3610 KeyboardInputMapper& mapper = in TEST_F() local
3616 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP, DISPLAY_ID)); in TEST_F()
3617 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3619 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3621 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3627 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT, DISPLAY_ID)); in TEST_F()
3628 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3630 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3632 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3638 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_DOWN, DISPLAY_ID)); in TEST_F()
3639 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3641 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3643 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3649 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_RIGHT, DISPLAY_ID)); in TEST_F()
3650 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3652 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3654 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3662 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3670 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3682 KeyboardInputMapper& mapper = in TEST_F() local
3688 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3690 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3695 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3697 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3708 KeyboardInputMapper& mapper = in TEST_F() local
3718 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3720 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3728 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 1); in TEST_F()
3730 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_UP, 0); in TEST_F()
3736 KeyboardInputMapper& mapper = in TEST_F() local
3741 ASSERT_EQ(1, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
3744 ASSERT_EQ(0, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
3748 KeyboardInputMapper& mapper = in TEST_F() local
3753 ASSERT_EQ(AKEYCODE_Z, mapper.getKeyCodeForKeyLocation(AKEYCODE_Y)) in TEST_F()
3756 ASSERT_EQ(AKEYCODE_A, mapper.getKeyCodeForKeyLocation(AKEYCODE_A)) in TEST_F()
3761 KeyboardInputMapper& mapper = in TEST_F() local
3766 ASSERT_EQ(1, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
3769 ASSERT_EQ(0, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
3773 KeyboardInputMapper& mapper = in TEST_F() local
3781 ASSERT_TRUE(mapper.markSupportedKeyCodes(AINPUT_SOURCE_ANY, 1, keyCodes, flags)); in TEST_F()
3794 KeyboardInputMapper& mapper = in TEST_F() local
3798 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3806 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3807 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3811 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
3814 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3815 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3819 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3822 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3823 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3827 ASSERT_EQ(AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3830 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
3831 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
3835 ASSERT_EQ(AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
3838 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3839 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3843 ASSERT_EQ(AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
3846 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
3847 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
3851 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3860 KeyboardInputMapper& mapper = in TEST_F() local
3865 mapper.reset(ARBITRARY_TIME); in TEST_F()
3866 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3868 mapper.updateMetaState(AKEYCODE_NUM_LOCK); in TEST_F()
3869 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3873 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_A, 1); in TEST_F()
3876 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3881 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_KEY, BTN_A, 0); in TEST_F()
3884 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3910 KeyboardInputMapper& mapper = in TEST_F() local
3949 testDPadKeyRotation(mapper, KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP, DISPLAY_ID)); in TEST_F()
3950 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_RIGHT, AKEYCODE_DPAD_RIGHT, in TEST_F()
3952 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_DOWN, AKEYCODE_DPAD_DOWN, in TEST_F()
3954 ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper, KEY_LEFT, AKEYCODE_DPAD_LEFT, in TEST_F()
3975 KeyboardInputMapper& mapper = in TEST_F() local
3979 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
3987 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 1); in TEST_F()
3988 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_CAPSLOCK, 0); in TEST_F()
3990 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
3993 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 1); in TEST_F()
3994 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_NUMLOCK, 0); in TEST_F()
3996 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper.getMetaState()); in TEST_F()
3999 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 1); in TEST_F()
4000 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_SCROLLLOCK, 0); in TEST_F()
4002 ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper.getMetaState()); in TEST_F()
4043 KeyboardInputMapper& mapper = in TEST_F() local
4047 ASSERT_EQ(AMETA_NONE, mapper.getMetaState()); in TEST_F()
4050 ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper.getMetaState()); in TEST_F()
4147 KeyboardInputMapper& mapper = in TEST_F() local
4151 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
4156 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
4160 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAY, 1); in TEST_F()
4164 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAY, 0); in TEST_F()
4168 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 1); in TEST_F()
4172 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAYPAUSE, 0); in TEST_F()
4185 KeyboardInputMapper& mapper = in TEST_F() local
4189 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_HOME, 1); in TEST_F()
4194 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_HOME, 0); in TEST_F()
4198 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_DOWN, 1); in TEST_F()
4202 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_DOWN, 0); in TEST_F()
4206 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, KEY_PLAY, 1); in TEST_F()
4210 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, KEY_PLAY, 0); in TEST_F()
4230 void testMotionRotation(CursorInputMapper& mapper, int32_t originalX, int32_t originalY,
4253 void CursorInputMapperTest::testMotionRotation(CursorInputMapper& mapper, int32_t originalX, in testMotionRotation() argument
4258 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, originalX); in testMotionRotation()
4259 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, originalY); in testMotionRotation()
4260 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in testMotionRotation()
4271 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4273 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
4278 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4280 ASSERT_EQ(AINPUT_SOURCE_TRACKBALL, mapper.getSources()); in TEST_F()
4285 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4288 mapper.populateDeviceInfo(&info); in TEST_F()
4300 mapper.populateDeviceInfo(&info2); in TEST_F()
4315 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4318 mapper.populateDeviceInfo(&info); in TEST_F()
4333 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4341 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 1); in TEST_F()
4342 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4380 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_KEY, BTN_MOUSE, 0); in TEST_F()
4381 process(mapper, ARBITRARY_TIME + 1, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4421 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4426 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 1); in TEST_F()
4427 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4435 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, -2); in TEST_F()
4436 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4445 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4450 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 1); in TEST_F()
4451 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4461 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 0); in TEST_F()
4462 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4474 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4479 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 1); in TEST_F()
4480 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, -2); in TEST_F()
4481 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 1); in TEST_F()
4482 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4496 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 2); in TEST_F()
4497 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 1); in TEST_F()
4498 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4506 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 0); in TEST_F()
4507 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4523 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4526 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, 1)); in TEST_F()
4527 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, 1)); in TEST_F()
4528 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 1, 0)); in TEST_F()
4529 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, -1, 1, -1)); in TEST_F()
4530 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, -1, 0, -1)); in TEST_F()
4531 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1, -1)); in TEST_F()
4532 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 0, -1, 0)); in TEST_F()
4533 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, -1, 1)); in TEST_F()
4541 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4545 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, 1)); in TEST_F()
4546 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, 1)); in TEST_F()
4547 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 1, 0)); in TEST_F()
4548 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, -1, 1, -1)); in TEST_F()
4549 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, -1, 0, -1)); in TEST_F()
4550 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1, -1)); in TEST_F()
4551 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 0, -1, 0)); in TEST_F()
4552 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, -1, 1)); in TEST_F()
4556 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, -1, 0)); in TEST_F()
4557 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, -1, 1)); in TEST_F()
4558 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 0, 1)); in TEST_F()
4559 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, -1, 1, 1)); in TEST_F()
4560 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, -1, 1, 0)); in TEST_F()
4561 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, 1, -1)); in TEST_F()
4562 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 0, 0, -1)); in TEST_F()
4563 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, -1, -1)); in TEST_F()
4567 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 0, -1)); in TEST_F()
4568 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, -1, -1)); in TEST_F()
4569 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, -1, 0)); in TEST_F()
4570 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, -1, -1, 1)); in TEST_F()
4571 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, -1, 0, 1)); in TEST_F()
4572 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, 1, 1)); in TEST_F()
4573 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 0, 1, 0)); in TEST_F()
4574 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, 1, -1)); in TEST_F()
4578 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, 1, 1, 0)); in TEST_F()
4579 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 1, 1, -1)); in TEST_F()
4580 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, 0, 0, -1)); in TEST_F()
4581 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 1, -1, -1, -1)); in TEST_F()
4582 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, 0, -1, -1, 0)); in TEST_F()
4583 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1, 1)); in TEST_F()
4584 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 0, 0, 1)); in TEST_F()
4585 ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, 1, 1, 1)); in TEST_F()
4590 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4600 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_LEFT, 1); in TEST_F()
4601 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4616 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_LEFT, 0); in TEST_F()
4617 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4640 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_RIGHT, 1); in TEST_F()
4641 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MIDDLE, 1); in TEST_F()
4642 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4669 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_RIGHT, 0); in TEST_F()
4670 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4685 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MIDDLE, 0); in TEST_F()
4686 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4693 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MIDDLE, 0); in TEST_F()
4694 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4711 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_BACK, 1); in TEST_F()
4712 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4731 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_BACK, 0); in TEST_F()
4732 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4752 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_SIDE, 1); in TEST_F()
4753 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4772 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_SIDE, 0); in TEST_F()
4773 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4793 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_FORWARD, 1); in TEST_F()
4794 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4813 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_FORWARD, 0); in TEST_F()
4814 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4834 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_EXTRA, 1); in TEST_F()
4835 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4854 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_EXTRA, 0); in TEST_F()
4855 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4877 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4885 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
4886 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
4887 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4899 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
4913 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
4914 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
4915 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4924 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_MOUSE, 1); in TEST_F()
4925 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4938 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_KEY, BTN_MOUSE, 0); in TEST_F()
4939 process(mapper, ARBITRARY_TIME + 2, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4952 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 30); in TEST_F()
4953 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 40); in TEST_F()
4954 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4972 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
4973 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
4974 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
4992 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
5002 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5003 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5004 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5021 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5022 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5023 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5033 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
5046 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5047 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5048 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5063 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5064 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5065 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5074 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
5090 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5091 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5092 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5100 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
5116 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5117 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5118 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5126 CursorInputMapper& mapper = addMapperAndConfigure<CursorInputMapper>(); in TEST_F() local
5139 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_X, 10); in TEST_F()
5140 process(mapper, ARBITRARY_TIME, READ_TIME, EV_REL, REL_Y, 20); in TEST_F()
5141 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in TEST_F()
5329 void processDown(SingleTouchInputMapper& mapper, int32_t x, int32_t y);
5330 void processMove(SingleTouchInputMapper& mapper, int32_t x, int32_t y);
5332 void processPressure(SingleTouchInputMapper& mapper, int32_t pressure);
5333 void processToolMajor(SingleTouchInputMapper& mapper, int32_t toolMajor);
5334 void processDistance(SingleTouchInputMapper& mapper, int32_t distance);
5335 void processTilt(SingleTouchInputMapper& mapper, int32_t tiltX, int32_t tiltY);
5336 void processKey(SingleTouchInputMapper& mapper, int32_t code, int32_t value);
5337 void processSync(SingleTouchInputMapper& mapper);
5367 void SingleTouchInputMapperTest::processDown(SingleTouchInputMapper& mapper, int32_t x, int32_t y) { in processDown() argument
5368 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 1); in processDown()
5369 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, x); in processDown()
5370 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, y); in processDown()
5373 void SingleTouchInputMapperTest::processMove(SingleTouchInputMapper& mapper, int32_t x, int32_t y) { in processMove() argument
5374 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_X, x); in processMove()
5375 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_Y, y); in processMove()
5378 void SingleTouchInputMapperTest::processUp(SingleTouchInputMapper& mapper) { in processUp() argument
5379 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, BTN_TOUCH, 0); in processUp()
5382 void SingleTouchInputMapperTest::processPressure(SingleTouchInputMapper& mapper, int32_t pressure) { in processPressure() argument
5383 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_PRESSURE, pressure); in processPressure()
5386 void SingleTouchInputMapperTest::processToolMajor(SingleTouchInputMapper& mapper, in processToolMajor() argument
5388 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TOOL_WIDTH, toolMajor); in processToolMajor()
5391 void SingleTouchInputMapperTest::processDistance(SingleTouchInputMapper& mapper, int32_t distance) { in processDistance() argument
5392 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_DISTANCE, distance); in processDistance()
5395 void SingleTouchInputMapperTest::processTilt(SingleTouchInputMapper& mapper, int32_t tiltX, in processTilt() argument
5397 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TILT_X, tiltX); in processTilt()
5398 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_TILT_Y, tiltY); in processTilt()
5401 void SingleTouchInputMapperTest::processKey(SingleTouchInputMapper& mapper, int32_t code, in processKey() argument
5403 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, code, value); in processKey()
5406 void SingleTouchInputMapperTest::processSync(SingleTouchInputMapper& mapper) { in processSync() argument
5407 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in processSync()
5413 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5415 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
5423 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5425 ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); in TEST_F()
5432 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5434 ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); in TEST_F()
5441 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5443 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
5452 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5455 ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A)); in TEST_F()
5460 processDown(mapper, x, y); in TEST_F()
5461 processSync(mapper); in TEST_F()
5464 ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME)); in TEST_F()
5467 processUp(mapper); in TEST_F()
5468 processSync(mapper); in TEST_F()
5471 ASSERT_EQ(AKEY_STATE_UP, mapper.getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME)); in TEST_F()
5480 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5483 ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_A)); in TEST_F()
5488 processDown(mapper, x, y); in TEST_F()
5489 processSync(mapper); in TEST_F()
5492 ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME)); in TEST_F()
5495 processUp(mapper); in TEST_F()
5496 processSync(mapper); in TEST_F()
5499 ASSERT_EQ(AKEY_STATE_UP, mapper.getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME)); in TEST_F()
5508 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5512 ASSERT_TRUE(mapper.markSupportedKeyCodes(AINPUT_SOURCE_ANY, 2, keys, flags)); in TEST_F()
5523 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5532 processDown(mapper, x, y); in TEST_F()
5533 processSync(mapper); in TEST_F()
5548 processUp(mapper); in TEST_F()
5549 processSync(mapper); in TEST_F()
5573 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5582 processDown(mapper, x, y); in TEST_F()
5583 processSync(mapper); in TEST_F()
5600 processMove(mapper, x, y); in TEST_F()
5601 processSync(mapper); in TEST_F()
5638 processMove(mapper, x, y); in TEST_F()
5639 processSync(mapper); in TEST_F()
5661 processUp(mapper); in TEST_F()
5662 processSync(mapper); in TEST_F()
5694 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5703 processDown(mapper, x, y); in TEST_F()
5704 processSync(mapper); in TEST_F()
5711 processMove(mapper, x, y); in TEST_F()
5712 processSync(mapper); in TEST_F()
5734 processUp(mapper); in TEST_F()
5735 processSync(mapper); in TEST_F()
5769 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5778 processDown(mapper, x, y); in TEST_F()
5779 processSync(mapper); in TEST_F()
5805 processMove(mapper, x, y); in TEST_F()
5806 processSync(mapper); in TEST_F()
5830 processUp(mapper); in TEST_F()
5831 processSync(mapper); in TEST_F()
5865 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5874 processDown(mapper, x, y); in TEST_F()
5875 processSync(mapper); in TEST_F()
5899 processMove(mapper, x, y); in TEST_F()
5900 processSync(mapper); in TEST_F()
5922 processUp(mapper); in TEST_F()
5923 processSync(mapper); in TEST_F()
5955 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5961 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5962 processSync(mapper); in TEST_F()
5968 processUp(mapper); in TEST_F()
5969 processSync(mapper); in TEST_F()
5980 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
5987 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
5988 processSync(mapper); in TEST_F()
5994 processUp(mapper); in TEST_F()
5995 processSync(mapper); in TEST_F()
6001 processDown(mapper, toRawX(75), RAW_Y_MAX - toRawY(50) + RAW_Y_MIN); in TEST_F()
6002 processSync(mapper); in TEST_F()
6008 processUp(mapper); in TEST_F()
6009 processSync(mapper); in TEST_F()
6015 processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN); in TEST_F()
6016 processSync(mapper); in TEST_F()
6022 processUp(mapper); in TEST_F()
6023 processSync(mapper); in TEST_F()
6029 processDown(mapper, RAW_X_MAX - toRawX(75) + RAW_X_MIN, toRawY(50)); in TEST_F()
6030 processSync(mapper); in TEST_F()
6036 processUp(mapper); in TEST_F()
6037 processSync(mapper); in TEST_F()
6049 auto& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6053 processDown(mapper, toRawX(50), toRawY(75)); in TEST_F()
6054 processSync(mapper); in TEST_F()
6060 processUp(mapper); in TEST_F()
6061 processSync(mapper); in TEST_F()
6073 auto& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6077 processDown(mapper, RAW_X_MAX - toRotatedRawX(75) + RAW_X_MIN, toRotatedRawY(50)); in TEST_F()
6078 processSync(mapper); in TEST_F()
6084 processUp(mapper); in TEST_F()
6085 processSync(mapper); in TEST_F()
6097 auto& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6101 processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN); in TEST_F()
6102 processSync(mapper); in TEST_F()
6108 processUp(mapper); in TEST_F()
6109 processSync(mapper); in TEST_F()
6121 auto& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6125 processDown(mapper, toRotatedRawX(75), RAW_Y_MAX - toRotatedRawY(50) + RAW_Y_MIN); in TEST_F()
6126 processSync(mapper); in TEST_F()
6132 processUp(mapper); in TEST_F()
6133 processSync(mapper); in TEST_F()
6145 auto& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6152 processDown(mapper, RAW_X_MAX - toRotatedRawX(75) + RAW_X_MIN, toRotatedRawY(50)); in TEST_F()
6153 processSync(mapper); in TEST_F()
6159 processUp(mapper); in TEST_F()
6160 processSync(mapper); in TEST_F()
6166 processDown(mapper, toRotatedRawX(50), toRotatedRawY(75)); in TEST_F()
6167 processSync(mapper); in TEST_F()
6173 processUp(mapper); in TEST_F()
6174 processSync(mapper); in TEST_F()
6180 processDown(mapper, toRotatedRawX(75), RAW_Y_MAX - toRotatedRawY(50) + RAW_Y_MIN); in TEST_F()
6181 processSync(mapper); in TEST_F()
6187 processUp(mapper); in TEST_F()
6188 processSync(mapper); in TEST_F()
6194 processDown(mapper, RAW_X_MAX - toRotatedRawX(50) + RAW_X_MIN, in TEST_F()
6196 processSync(mapper); in TEST_F()
6202 processUp(mapper); in TEST_F()
6203 processSync(mapper); in TEST_F()
6212 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6237 processDown(mapper, rawX, rawY); in TEST_F()
6238 processPressure(mapper, rawPressure); in TEST_F()
6239 processToolMajor(mapper, rawToolMajor); in TEST_F()
6240 processDistance(mapper, rawDistance); in TEST_F()
6241 processTilt(mapper, rawTiltX, rawTiltY); in TEST_F()
6242 processSync(mapper); in TEST_F()
6257 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6265 processDown(mapper, rawX, rawY); in TEST_F()
6266 processSync(mapper); in TEST_F()
6279 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6284 processDown(mapper, 100, 200); in TEST_F()
6285 processSync(mapper); in TEST_F()
6291 processKey(mapper, BTN_LEFT, 1); in TEST_F()
6292 processSync(mapper); in TEST_F()
6301 processKey(mapper, BTN_LEFT, 0); in TEST_F()
6302 processSync(mapper); in TEST_F()
6312 processKey(mapper, BTN_RIGHT, 1); in TEST_F()
6313 processKey(mapper, BTN_MIDDLE, 1); in TEST_F()
6314 processSync(mapper); in TEST_F()
6329 processKey(mapper, BTN_RIGHT, 0); in TEST_F()
6330 processSync(mapper); in TEST_F()
6339 processKey(mapper, BTN_MIDDLE, 0); in TEST_F()
6340 processSync(mapper); in TEST_F()
6350 processKey(mapper, BTN_BACK, 1); in TEST_F()
6351 processSync(mapper); in TEST_F()
6364 processKey(mapper, BTN_BACK, 0); in TEST_F()
6365 processSync(mapper); in TEST_F()
6379 processKey(mapper, BTN_SIDE, 1); in TEST_F()
6380 processSync(mapper); in TEST_F()
6393 processKey(mapper, BTN_SIDE, 0); in TEST_F()
6394 processSync(mapper); in TEST_F()
6408 processKey(mapper, BTN_FORWARD, 1); in TEST_F()
6409 processSync(mapper); in TEST_F()
6422 processKey(mapper, BTN_FORWARD, 0); in TEST_F()
6423 processSync(mapper); in TEST_F()
6437 processKey(mapper, BTN_EXTRA, 1); in TEST_F()
6438 processSync(mapper); in TEST_F()
6451 processKey(mapper, BTN_EXTRA, 0); in TEST_F()
6452 processSync(mapper); in TEST_F()
6468 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
6469 processSync(mapper); in TEST_F()
6478 processKey(mapper, BTN_STYLUS, 0); in TEST_F()
6479 processSync(mapper); in TEST_F()
6489 processKey(mapper, BTN_STYLUS2, 1); in TEST_F()
6490 processSync(mapper); in TEST_F()
6499 processKey(mapper, BTN_STYLUS2, 0); in TEST_F()
6500 processSync(mapper); in TEST_F()
6510 processUp(mapper); in TEST_F()
6511 processSync(mapper); in TEST_F()
6522 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6527 processDown(mapper, 100, 200); in TEST_F()
6528 processSync(mapper); in TEST_F()
6534 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
6535 processSync(mapper); in TEST_F()
6541 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
6542 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
6543 processSync(mapper); in TEST_F()
6549 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
6550 processKey(mapper, BTN_TOOL_BRUSH, 1); in TEST_F()
6551 processSync(mapper); in TEST_F()
6557 processKey(mapper, BTN_TOOL_BRUSH, 0); in TEST_F()
6558 processKey(mapper, BTN_TOOL_PENCIL, 1); in TEST_F()
6559 processSync(mapper); in TEST_F()
6565 processKey(mapper, BTN_TOOL_PENCIL, 0); in TEST_F()
6566 processKey(mapper, BTN_TOOL_AIRBRUSH, 1); in TEST_F()
6567 processSync(mapper); in TEST_F()
6573 processKey(mapper, BTN_TOOL_AIRBRUSH, 0); in TEST_F()
6574 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
6575 processSync(mapper); in TEST_F()
6581 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
6582 processKey(mapper, BTN_TOOL_LENS, 1); in TEST_F()
6583 processSync(mapper); in TEST_F()
6589 processKey(mapper, BTN_TOOL_LENS, 0); in TEST_F()
6590 processKey(mapper, BTN_TOOL_DOUBLETAP, 1); in TEST_F()
6591 processSync(mapper); in TEST_F()
6597 processKey(mapper, BTN_TOOL_DOUBLETAP, 0); in TEST_F()
6598 processKey(mapper, BTN_TOOL_TRIPLETAP, 1); in TEST_F()
6599 processSync(mapper); in TEST_F()
6605 processKey(mapper, BTN_TOOL_TRIPLETAP, 0); in TEST_F()
6606 processKey(mapper, BTN_TOOL_QUADTAP, 1); in TEST_F()
6607 processSync(mapper); in TEST_F()
6613 processKey(mapper, BTN_TOOL_QUADTAP, 0); in TEST_F()
6614 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
6615 processSync(mapper); in TEST_F()
6621 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
6622 processSync(mapper); in TEST_F()
6628 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
6629 processSync(mapper); in TEST_F()
6635 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
6636 processSync(mapper); in TEST_F()
6642 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
6643 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
6644 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
6645 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
6646 processSync(mapper); in TEST_F()
6658 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6663 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
6664 processMove(mapper, 100, 200); in TEST_F()
6665 processSync(mapper); in TEST_F()
6677 processMove(mapper, 150, 250); in TEST_F()
6678 processSync(mapper); in TEST_F()
6685 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
6686 processSync(mapper); in TEST_F()
6698 processKey(mapper, BTN_TOUCH, 0); in TEST_F()
6699 processSync(mapper); in TEST_F()
6716 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
6717 processSync(mapper); in TEST_F()
6729 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6734 processDown(mapper, 100, 200); in TEST_F()
6735 processPressure(mapper, 0); in TEST_F()
6736 processSync(mapper); in TEST_F()
6748 processMove(mapper, 150, 250); in TEST_F()
6749 processSync(mapper); in TEST_F()
6756 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
6757 processSync(mapper); in TEST_F()
6769 processPressure(mapper, 0); in TEST_F()
6770 processSync(mapper); in TEST_F()
6787 processUp(mapper); in TEST_F()
6788 processSync(mapper); in TEST_F()
6800 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6811 mapper.reset(ARBITRARY_TIME); in TEST_F()
6815 processSync(mapper); in TEST_F()
6835 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6839 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
6840 processDown(mapper, 100, 200); in TEST_F()
6841 processSync(mapper); in TEST_F()
6877 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6881 processDown(mapper, 100, 200); in TEST_F()
6882 processSync(mapper); in TEST_F()
6905 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
6910 processDown(mapper, 100, 200); in TEST_F()
6911 processSync(mapper); in TEST_F()
6928 processMove(mapper, 101, 201); in TEST_F()
6929 processSync(mapper); in TEST_F()
6930 processUp(mapper); in TEST_F()
6931 processSync(mapper); in TEST_F()
6935 processDown(mapper, 300, 400); in TEST_F()
6939 processSync(mapper); in TEST_F()
6951 processSync(mapper); in TEST_F()
7035 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
7054 processDown(mapper, toRawX(point.x), toRawY(point.y)); in TEST_F()
7055 processSync(mapper); in TEST_F()
7056 processUp(mapper); in TEST_F()
7057 processSync(mapper); in TEST_F()
7071 SingleTouchInputMapper& mapper = addMapperAndConfigure<SingleTouchInputMapper>(); in TEST_F() local
7088 processDown(mapper, toRawX(kOutsidePoint.x), toRawY(kOutsidePoint.y)); in TEST_F()
7089 processSync(mapper); in TEST_F()
7093 processMove(mapper, toRawX(11), toRawY(21)); in TEST_F()
7094 processSync(mapper); in TEST_F()
7102 processMove(mapper, toRawX(69), toRawY(159)); in TEST_F()
7103 processSync(mapper); in TEST_F()
7108 processMove(mapper, toRawX(kOutsidePoint.x), toRawY(kOutsidePoint.y)); in TEST_F()
7109 processSync(mapper); in TEST_F()
7113 processUp(mapper); in TEST_F()
7114 processSync(mapper); in TEST_F()
7132 void processPosition(MultiTouchInputMapper& mapper, int32_t x, int32_t y);
7133 void processTouchMajor(MultiTouchInputMapper& mapper, int32_t touchMajor);
7134 void processTouchMinor(MultiTouchInputMapper& mapper, int32_t touchMinor);
7135 void processToolMajor(MultiTouchInputMapper& mapper, int32_t toolMajor);
7136 void processToolMinor(MultiTouchInputMapper& mapper, int32_t toolMinor);
7137 void processOrientation(MultiTouchInputMapper& mapper, int32_t orientation);
7138 void processPressure(MultiTouchInputMapper& mapper, int32_t pressure);
7139 void processDistance(MultiTouchInputMapper& mapper, int32_t distance);
7140 void processId(MultiTouchInputMapper& mapper, int32_t id);
7141 void processSlot(MultiTouchInputMapper& mapper, int32_t slot);
7142 void processToolType(MultiTouchInputMapper& mapper, int32_t toolType);
7143 void processKey(MultiTouchInputMapper& mapper, int32_t code, int32_t value);
7144 void processMTSync(MultiTouchInputMapper& mapper);
7145 void processSync(MultiTouchInputMapper& mapper);
7194 void MultiTouchInputMapperTest::processPosition(MultiTouchInputMapper& mapper, int32_t x, in processPosition() argument
7196 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_POSITION_X, x); in processPosition()
7197 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_POSITION_Y, y); in processPosition()
7200 void MultiTouchInputMapperTest::processTouchMajor(MultiTouchInputMapper& mapper, in processTouchMajor() argument
7202 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOUCH_MAJOR, touchMajor); in processTouchMajor()
7205 void MultiTouchInputMapperTest::processTouchMinor(MultiTouchInputMapper& mapper, in processTouchMinor() argument
7207 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOUCH_MINOR, touchMinor); in processTouchMinor()
7210 void MultiTouchInputMapperTest::processToolMajor(MultiTouchInputMapper& mapper, int32_t toolMajor) { in processToolMajor() argument
7211 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_WIDTH_MAJOR, toolMajor); in processToolMajor()
7214 void MultiTouchInputMapperTest::processToolMinor(MultiTouchInputMapper& mapper, int32_t toolMinor) { in processToolMinor() argument
7215 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_WIDTH_MINOR, toolMinor); in processToolMinor()
7218 void MultiTouchInputMapperTest::processOrientation(MultiTouchInputMapper& mapper, in processOrientation() argument
7220 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_ORIENTATION, orientation); in processOrientation()
7223 void MultiTouchInputMapperTest::processPressure(MultiTouchInputMapper& mapper, int32_t pressure) { in processPressure() argument
7224 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_PRESSURE, pressure); in processPressure()
7227 void MultiTouchInputMapperTest::processDistance(MultiTouchInputMapper& mapper, int32_t distance) { in processDistance() argument
7228 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_DISTANCE, distance); in processDistance()
7231 void MultiTouchInputMapperTest::processId(MultiTouchInputMapper& mapper, int32_t id) { in processId() argument
7232 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TRACKING_ID, id); in processId()
7235 void MultiTouchInputMapperTest::processSlot(MultiTouchInputMapper& mapper, int32_t slot) { in processSlot() argument
7236 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_SLOT, slot); in processSlot()
7239 void MultiTouchInputMapperTest::processToolType(MultiTouchInputMapper& mapper, int32_t toolType) { in processToolType() argument
7240 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, ABS_MT_TOOL_TYPE, toolType); in processToolType()
7243 void MultiTouchInputMapperTest::processKey(MultiTouchInputMapper& mapper, int32_t code, in processKey() argument
7245 process(mapper, ARBITRARY_TIME, READ_TIME, EV_KEY, code, value); in processKey()
7248 void MultiTouchInputMapperTest::processMTSync(MultiTouchInputMapper& mapper) { in processMTSync() argument
7249 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_MT_REPORT, 0); in processMTSync()
7252 void MultiTouchInputMapperTest::processSync(MultiTouchInputMapper& mapper) { in processSync() argument
7253 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in processSync()
7261 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7269 processPosition(mapper, x1, y1); in TEST_F()
7270 processMTSync(mapper); in TEST_F()
7271 processPosition(mapper, x2, y2); in TEST_F()
7272 processMTSync(mapper); in TEST_F()
7273 processSync(mapper); in TEST_F()
7319 processPosition(mapper, x1, y1); in TEST_F()
7320 processMTSync(mapper); in TEST_F()
7321 processPosition(mapper, x2, y2); in TEST_F()
7322 processMTSync(mapper); in TEST_F()
7323 processSync(mapper); in TEST_F()
7350 processPosition(mapper, x2, y2); in TEST_F()
7351 processMTSync(mapper); in TEST_F()
7352 processSync(mapper); in TEST_F()
7398 processPosition(mapper, x2, y2); in TEST_F()
7399 processMTSync(mapper); in TEST_F()
7400 processSync(mapper); in TEST_F()
7423 processPosition(mapper, x2, y2); in TEST_F()
7424 processMTSync(mapper); in TEST_F()
7425 processPosition(mapper, x3, y3); in TEST_F()
7426 processMTSync(mapper); in TEST_F()
7427 processSync(mapper); in TEST_F()
7454 processPosition(mapper, x3, y3); in TEST_F()
7455 processMTSync(mapper); in TEST_F()
7456 processSync(mapper); in TEST_F()
7501 processMTSync(mapper); in TEST_F()
7502 processSync(mapper); in TEST_F()
7545 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7548 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_X, 10 / X_PRECISION); in TEST_F()
7549 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_Y, 11 / Y_PRECISION); in TEST_F()
7551 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOUCH_MAJOR, 12 * GEOMETRIC_SCALE); in TEST_F()
7552 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOUCH_MINOR, 13 * GEOMETRIC_SCALE); in TEST_F()
7554 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOOL_MAJOR, 14 * GEOMETRIC_SCALE); in TEST_F()
7555 assertAxisResolution(mapper, AMOTION_EVENT_AXIS_TOOL_MINOR, 15 * GEOMETRIC_SCALE); in TEST_F()
7569 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7572 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOUCH_MAJOR); in TEST_F()
7573 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOUCH_MINOR); in TEST_F()
7575 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOOL_MAJOR); in TEST_F()
7576 assertAxisNotPresent(mapper, AMOTION_EVENT_AXIS_TOOL_MINOR); in TEST_F()
7584 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7592 processPosition(mapper, x1, y1); in TEST_F()
7593 processId(mapper, 1); in TEST_F()
7594 processMTSync(mapper); in TEST_F()
7595 processPosition(mapper, x2, y2); in TEST_F()
7596 processId(mapper, 2); in TEST_F()
7597 processMTSync(mapper); in TEST_F()
7598 processSync(mapper); in TEST_F()
7622 processPosition(mapper, x1, y1); in TEST_F()
7623 processId(mapper, 1); in TEST_F()
7624 processMTSync(mapper); in TEST_F()
7625 processPosition(mapper, x2, y2); in TEST_F()
7626 processId(mapper, 2); in TEST_F()
7627 processMTSync(mapper); in TEST_F()
7628 processSync(mapper); in TEST_F()
7644 processPosition(mapper, x2, y2); in TEST_F()
7645 processId(mapper, 2); in TEST_F()
7646 processMTSync(mapper); in TEST_F()
7647 processSync(mapper); in TEST_F()
7671 processPosition(mapper, x2, y2); in TEST_F()
7672 processId(mapper, 2); in TEST_F()
7673 processMTSync(mapper); in TEST_F()
7674 processSync(mapper); in TEST_F()
7686 processPosition(mapper, x2, y2); in TEST_F()
7687 processId(mapper, 2); in TEST_F()
7688 processMTSync(mapper); in TEST_F()
7689 processPosition(mapper, x3, y3); in TEST_F()
7690 processId(mapper, 3); in TEST_F()
7691 processMTSync(mapper); in TEST_F()
7692 processSync(mapper); in TEST_F()
7708 processPosition(mapper, x3, y3); in TEST_F()
7709 processId(mapper, 3); in TEST_F()
7710 processMTSync(mapper); in TEST_F()
7711 processSync(mapper); in TEST_F()
7734 processMTSync(mapper); in TEST_F()
7735 processSync(mapper); in TEST_F()
7755 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7763 processPosition(mapper, x1, y1); in TEST_F()
7764 processId(mapper, 1); in TEST_F()
7765 processSlot(mapper, 1); in TEST_F()
7766 processPosition(mapper, x2, y2); in TEST_F()
7767 processId(mapper, 2); in TEST_F()
7768 processSync(mapper); in TEST_F()
7792 processSlot(mapper, 0); in TEST_F()
7793 processPosition(mapper, x1, y1); in TEST_F()
7794 processSlot(mapper, 1); in TEST_F()
7795 processPosition(mapper, x2, y2); in TEST_F()
7796 processSync(mapper); in TEST_F()
7812 processSlot(mapper, 0); in TEST_F()
7813 processId(mapper, -1); in TEST_F()
7814 processSlot(mapper, 1); in TEST_F()
7815 processPosition(mapper, x2, y2); in TEST_F()
7816 processSync(mapper); in TEST_F()
7840 processPosition(mapper, x2, y2); in TEST_F()
7841 processSync(mapper); in TEST_F()
7853 processPosition(mapper, x2, y2); in TEST_F()
7854 processSlot(mapper, 0); in TEST_F()
7855 processId(mapper, 3); in TEST_F()
7856 processPosition(mapper, x3, y3); in TEST_F()
7857 processSync(mapper); in TEST_F()
7873 processSlot(mapper, 1); in TEST_F()
7874 processId(mapper, -1); in TEST_F()
7875 processSlot(mapper, 0); in TEST_F()
7876 processPosition(mapper, x3, y3); in TEST_F()
7877 processSync(mapper); in TEST_F()
7900 processId(mapper, -1); in TEST_F()
7901 processSync(mapper); in TEST_F()
7920 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7945 processPosition(mapper, rawX, rawY); in TEST_F()
7946 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7947 processTouchMinor(mapper, rawTouchMinor); in TEST_F()
7948 processToolMajor(mapper, rawToolMajor); in TEST_F()
7949 processToolMinor(mapper, rawToolMinor); in TEST_F()
7950 processPressure(mapper, rawPressure); in TEST_F()
7951 processOrientation(mapper, rawOrientation); in TEST_F()
7952 processDistance(mapper, rawDistance); in TEST_F()
7953 processId(mapper, id); in TEST_F()
7954 processMTSync(mapper); in TEST_F()
7955 processSync(mapper); in TEST_F()
7970 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
7988 processPosition(mapper, rawX, rawY); in TEST_F()
7989 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
7990 processTouchMinor(mapper, rawTouchMinor); in TEST_F()
7991 processToolMajor(mapper, rawToolMajor); in TEST_F()
7992 processToolMinor(mapper, rawToolMinor); in TEST_F()
7993 processMTSync(mapper); in TEST_F()
7994 processSync(mapper); in TEST_F()
8010 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8030 processPosition(mapper, rawX, rawY); in TEST_F()
8031 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
8032 processToolMajor(mapper, rawToolMajor); in TEST_F()
8033 processMTSync(mapper); in TEST_F()
8034 processPosition(mapper, rawX2, rawY2); in TEST_F()
8035 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
8036 processToolMajor(mapper, rawToolMajor); in TEST_F()
8037 processMTSync(mapper); in TEST_F()
8038 processSync(mapper); in TEST_F()
8060 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8074 processPosition(mapper, rawX, rawY); in TEST_F()
8075 processTouchMajor(mapper, rawTouchMajor); in TEST_F()
8076 processToolMajor(mapper, rawToolMajor); in TEST_F()
8077 processMTSync(mapper); in TEST_F()
8078 processSync(mapper); in TEST_F()
8092 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8095 mapper.populateDeviceInfo(&info); in TEST_F()
8109 processPosition(mapper, rawX, rawY); in TEST_F()
8110 processPressure(mapper, rawPressure); in TEST_F()
8111 processMTSync(mapper); in TEST_F()
8112 processSync(mapper); in TEST_F()
8124 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8129 processId(mapper, 1); in TEST_F()
8130 processPosition(mapper, 100, 200); in TEST_F()
8131 processSync(mapper); in TEST_F()
8137 processKey(mapper, BTN_LEFT, 1); in TEST_F()
8138 processSync(mapper); in TEST_F()
8147 processKey(mapper, BTN_LEFT, 0); in TEST_F()
8148 processSync(mapper); in TEST_F()
8158 processKey(mapper, BTN_RIGHT, 1); in TEST_F()
8159 processKey(mapper, BTN_MIDDLE, 1); in TEST_F()
8160 processSync(mapper); in TEST_F()
8175 processKey(mapper, BTN_RIGHT, 0); in TEST_F()
8176 processSync(mapper); in TEST_F()
8185 processKey(mapper, BTN_MIDDLE, 0); in TEST_F()
8186 processSync(mapper); in TEST_F()
8196 processKey(mapper, BTN_BACK, 1); in TEST_F()
8197 processSync(mapper); in TEST_F()
8210 processKey(mapper, BTN_BACK, 0); in TEST_F()
8211 processSync(mapper); in TEST_F()
8225 processKey(mapper, BTN_SIDE, 1); in TEST_F()
8226 processSync(mapper); in TEST_F()
8239 processKey(mapper, BTN_SIDE, 0); in TEST_F()
8240 processSync(mapper); in TEST_F()
8254 processKey(mapper, BTN_FORWARD, 1); in TEST_F()
8255 processSync(mapper); in TEST_F()
8268 processKey(mapper, BTN_FORWARD, 0); in TEST_F()
8269 processSync(mapper); in TEST_F()
8283 processKey(mapper, BTN_EXTRA, 1); in TEST_F()
8284 processSync(mapper); in TEST_F()
8297 processKey(mapper, BTN_EXTRA, 0); in TEST_F()
8298 processSync(mapper); in TEST_F()
8314 processKey(mapper, BTN_STYLUS, 1); in TEST_F()
8315 processSync(mapper); in TEST_F()
8324 processKey(mapper, BTN_STYLUS, 0); in TEST_F()
8325 processSync(mapper); in TEST_F()
8335 processKey(mapper, BTN_STYLUS2, 1); in TEST_F()
8336 processSync(mapper); in TEST_F()
8345 processKey(mapper, BTN_STYLUS2, 0); in TEST_F()
8346 processSync(mapper); in TEST_F()
8356 processId(mapper, -1); in TEST_F()
8357 processSync(mapper); in TEST_F()
8367 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8372 processId(mapper, 1); in TEST_F()
8373 processPosition(mapper, 100, 200); in TEST_F()
8374 processSync(mapper); in TEST_F()
8380 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
8381 processSync(mapper); in TEST_F()
8387 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
8388 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
8389 processSync(mapper); in TEST_F()
8395 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
8396 processKey(mapper, BTN_TOOL_BRUSH, 1); in TEST_F()
8397 processSync(mapper); in TEST_F()
8403 processKey(mapper, BTN_TOOL_BRUSH, 0); in TEST_F()
8404 processKey(mapper, BTN_TOOL_PENCIL, 1); in TEST_F()
8405 processSync(mapper); in TEST_F()
8411 processKey(mapper, BTN_TOOL_PENCIL, 0); in TEST_F()
8412 processKey(mapper, BTN_TOOL_AIRBRUSH, 1); in TEST_F()
8413 processSync(mapper); in TEST_F()
8419 processKey(mapper, BTN_TOOL_AIRBRUSH, 0); in TEST_F()
8420 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
8421 processSync(mapper); in TEST_F()
8427 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
8428 processKey(mapper, BTN_TOOL_LENS, 1); in TEST_F()
8429 processSync(mapper); in TEST_F()
8435 processKey(mapper, BTN_TOOL_LENS, 0); in TEST_F()
8436 processKey(mapper, BTN_TOOL_DOUBLETAP, 1); in TEST_F()
8437 processSync(mapper); in TEST_F()
8443 processKey(mapper, BTN_TOOL_DOUBLETAP, 0); in TEST_F()
8444 processKey(mapper, BTN_TOOL_TRIPLETAP, 1); in TEST_F()
8445 processSync(mapper); in TEST_F()
8451 processKey(mapper, BTN_TOOL_TRIPLETAP, 0); in TEST_F()
8452 processKey(mapper, BTN_TOOL_QUADTAP, 1); in TEST_F()
8453 processSync(mapper); in TEST_F()
8459 processKey(mapper, BTN_TOOL_QUADTAP, 0); in TEST_F()
8460 processKey(mapper, BTN_TOOL_FINGER, 1); in TEST_F()
8461 processSync(mapper); in TEST_F()
8467 processKey(mapper, BTN_TOOL_PEN, 1); in TEST_F()
8468 processSync(mapper); in TEST_F()
8474 processKey(mapper, BTN_TOOL_RUBBER, 1); in TEST_F()
8475 processSync(mapper); in TEST_F()
8481 processKey(mapper, BTN_TOOL_MOUSE, 1); in TEST_F()
8482 processSync(mapper); in TEST_F()
8488 processToolType(mapper, MT_TOOL_FINGER); // this is the first time we send MT_TOOL_TYPE in TEST_F()
8489 processSync(mapper); in TEST_F()
8495 processToolType(mapper, MT_TOOL_PEN); in TEST_F()
8496 processSync(mapper); in TEST_F()
8502 processToolType(mapper, -1); // use a deliberately undefined tool type, for testing in TEST_F()
8503 processKey(mapper, BTN_TOOL_MOUSE, 0); in TEST_F()
8504 processKey(mapper, BTN_TOOL_RUBBER, 0); in TEST_F()
8505 processKey(mapper, BTN_TOOL_PEN, 0); in TEST_F()
8506 processKey(mapper, BTN_TOOL_FINGER, 0); in TEST_F()
8507 processSync(mapper); in TEST_F()
8518 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8523 processId(mapper, 1); in TEST_F()
8524 processPosition(mapper, 100, 200); in TEST_F()
8525 processSync(mapper); in TEST_F()
8537 processPosition(mapper, 150, 250); in TEST_F()
8538 processSync(mapper); in TEST_F()
8545 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
8546 processSync(mapper); in TEST_F()
8558 processKey(mapper, BTN_TOUCH, 0); in TEST_F()
8559 processSync(mapper); in TEST_F()
8576 processId(mapper, -1); in TEST_F()
8577 processSync(mapper); in TEST_F()
8588 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8593 processId(mapper, 1); in TEST_F()
8594 processPosition(mapper, 100, 200); in TEST_F()
8595 processPressure(mapper, 0); in TEST_F()
8596 processSync(mapper); in TEST_F()
8608 processPosition(mapper, 150, 250); in TEST_F()
8609 processSync(mapper); in TEST_F()
8616 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
8617 processSync(mapper); in TEST_F()
8629 processPressure(mapper, 0); in TEST_F()
8630 processSync(mapper); in TEST_F()
8647 processId(mapper, -1); in TEST_F()
8648 processSync(mapper); in TEST_F()
8669 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8681 processPosition(mapper, 100, 100); in TEST_F()
8682 processSync(mapper); in TEST_F()
8688 processPosition(mapper, 100, 100); in TEST_F()
8689 processSync(mapper); in TEST_F()
8699 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8707 processPosition(mapper, 100, 100); in TEST_F()
8708 processSync(mapper); in TEST_F()
8729 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8732 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
8735 processPosition(mapper, 100, 100); in TEST_F()
8736 processSync(mapper); in TEST_F()
8749 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8752 process(mapper, 10, 11 /*readTime*/, EV_ABS, ABS_MT_TRACKING_ID, 1); in TEST_F()
8753 process(mapper, 15, 16 /*readTime*/, EV_ABS, ABS_MT_POSITION_X, 100); in TEST_F()
8754 process(mapper, 20, 21 /*readTime*/, EV_ABS, ABS_MT_POSITION_Y, 100); in TEST_F()
8755 process(mapper, 25, 26 /*readTime*/, EV_SYN, SYN_REPORT, 0); in TEST_F()
8761 process(mapper, 30, 31 /*readTime*/, EV_ABS, ABS_MT_POSITION_X, 110); in TEST_F()
8762 process(mapper, 30, 32 /*readTime*/, EV_ABS, ABS_MT_POSITION_Y, 220); in TEST_F()
8763 process(mapper, 30, 33 /*readTime*/, EV_SYN, SYN_REPORT, 0); in TEST_F()
8780 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8783 processPosition(mapper, 100, 100); in TEST_F()
8784 processSync(mapper); in TEST_F()
8801 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8805 processPosition(mapper, x, y); in TEST_F()
8806 processSync(mapper); in TEST_F()
8823 processPosition(mapper, x, y); in TEST_F()
8824 processSync(mapper); in TEST_F()
8834 processPosition(mapper, x, y); in TEST_F()
8835 processSync(mapper); in TEST_F()
8844 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8894 processPosition(mapper, x1, y1); in TEST_F()
8895 processId(mapper, 1); in TEST_F()
8896 processSlot(mapper, 1); in TEST_F()
8897 processPosition(mapper, x2, y2); in TEST_F()
8898 processId(mapper, 2); in TEST_F()
8899 processSync(mapper); in TEST_F()
8923 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8930 processPosition(mapper, 100, 200); in TEST_F()
8931 processSync(mapper); in TEST_F()
8938 processPosition(mapper, 200, 200); in TEST_F()
8939 processSync(mapper); in TEST_F()
8947 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8960 processPosition(mapper, 100, 200); in TEST_F()
8961 processSync(mapper); in TEST_F()
8973 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
8986 processPosition(mapper, 100, 200); in TEST_F()
8987 processSync(mapper); in TEST_F()
8997 processSync(mapper); in TEST_F()
9005 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9016 processPosition(mapper, 100, 200); in TEST_F()
9017 processSync(mapper); in TEST_F()
9028 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9039 processPosition(mapper, 100, 200); in TEST_F()
9040 processSync(mapper); in TEST_F()
9065 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9074 processPosition(mapper, 100, 100); in TEST_F()
9075 processSync(mapper); in TEST_F()
9086 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9092 processId(mapper, 1); in TEST_F()
9093 processPosition(mapper, x1, y1); in TEST_F()
9094 processSync(mapper); in TEST_F()
9100 processId(mapper, 1); in TEST_F()
9101 processPosition(mapper, x2, y2); in TEST_F()
9102 processSync(mapper); in TEST_F()
9108 processId(mapper, -1); in TEST_F()
9109 processSync(mapper); in TEST_F()
9115 processId(mapper, 1); in TEST_F()
9116 processPosition(mapper, x3, y3); in TEST_F()
9117 processSync(mapper); in TEST_F()
9131 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9137 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9138 processPosition(mapper, x1, y1); in TEST_F()
9139 processSync(mapper); in TEST_F()
9145 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9146 processSync(mapper); in TEST_F()
9151 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9152 processPosition(mapper, x2, y2); in TEST_F()
9153 processSync(mapper); in TEST_F()
9157 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9158 processSync(mapper); in TEST_F()
9162 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9163 processToolType(mapper, MT_TOOL_FINGER); in TEST_F()
9164 processPosition(mapper, x3, y3); in TEST_F()
9165 processSync(mapper); in TEST_F()
9179 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9185 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9186 processPosition(mapper, x1, y1); in TEST_F()
9187 processSync(mapper); in TEST_F()
9193 processSlot(mapper, SECOND_SLOT); in TEST_F()
9194 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9195 processPosition(mapper, x2, y2); in TEST_F()
9196 processSync(mapper); in TEST_F()
9203 processSlot(mapper, FIRST_SLOT); in TEST_F()
9204 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9205 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9206 processSync(mapper); in TEST_F()
9212 processSlot(mapper, SECOND_SLOT); in TEST_F()
9213 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9214 processPosition(mapper, x2 + 1, y2 + 1); in TEST_F()
9215 processSync(mapper); in TEST_F()
9222 processSlot(mapper, FIRST_SLOT); in TEST_F()
9223 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9224 processSync(mapper); in TEST_F()
9230 processSlot(mapper, SECOND_SLOT); in TEST_F()
9231 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9232 processPosition(mapper, x2 + 2, y2 + 2); in TEST_F()
9233 processSync(mapper); in TEST_F()
9239 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9240 processSync(mapper); in TEST_F()
9254 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9260 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9261 processPosition(mapper, x1, y1); in TEST_F()
9262 processSync(mapper); in TEST_F()
9268 processSlot(mapper, SECOND_SLOT); in TEST_F()
9269 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9270 processPosition(mapper, x2, y2); in TEST_F()
9271 processSync(mapper); in TEST_F()
9278 processSlot(mapper, FIRST_SLOT); in TEST_F()
9279 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9280 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9281 processSync(mapper); in TEST_F()
9287 processSlot(mapper, SECOND_SLOT); in TEST_F()
9288 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9289 processPosition(mapper, x2 + 1, y2 + 1); in TEST_F()
9290 processSync(mapper); in TEST_F()
9295 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9296 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9297 processSync(mapper); in TEST_F()
9302 processSlot(mapper, THIRD_SLOT); in TEST_F()
9303 processId(mapper, THIRD_TRACKING_ID); in TEST_F()
9304 processToolType(mapper, MT_TOOL_FINGER); in TEST_F()
9305 processPosition(mapper, x3, y3); in TEST_F()
9306 processSync(mapper); in TEST_F()
9313 processId(mapper, THIRD_TRACKING_ID); in TEST_F()
9314 processPosition(mapper, x3 + 1, y3 + 1); in TEST_F()
9315 processSync(mapper); in TEST_F()
9320 processSlot(mapper, FIRST_SLOT); in TEST_F()
9321 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9322 processSync(mapper); in TEST_F()
9328 processSlot(mapper, SECOND_SLOT); in TEST_F()
9329 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9330 processSync(mapper); in TEST_F()
9336 processSlot(mapper, THIRD_SLOT); in TEST_F()
9337 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9338 processSync(mapper); in TEST_F()
9352 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9358 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9359 processPosition(mapper, x1, y1); in TEST_F()
9360 processSync(mapper); in TEST_F()
9366 processSlot(mapper, SECOND_SLOT); in TEST_F()
9367 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9368 processPosition(mapper, x2, y2); in TEST_F()
9369 processSync(mapper); in TEST_F()
9376 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9377 processToolType(mapper, MT_TOOL_PALM); in TEST_F()
9378 processSync(mapper); in TEST_F()
9384 processSlot(mapper, FIRST_SLOT); in TEST_F()
9385 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9386 processPosition(mapper, x1 + 1, y1 + 1); in TEST_F()
9387 processSync(mapper); in TEST_F()
9393 processSlot(mapper, SECOND_SLOT); in TEST_F()
9394 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9395 processSync(mapper); in TEST_F()
9400 processSlot(mapper, FIRST_SLOT); in TEST_F()
9401 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9402 processPosition(mapper, x1 + 2, y1 + 2); in TEST_F()
9403 processSync(mapper); in TEST_F()
9408 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9409 processSync(mapper); in TEST_F()
9424 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9430 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9431 processPosition(mapper, x1, y1); in TEST_F()
9432 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9433 processSync(mapper); in TEST_F()
9439 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9440 processPosition(mapper, x1 + 1, y1 + 1); in TEST_F()
9441 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9442 processSync(mapper); in TEST_F()
9448 processSlot(mapper, SECOND_SLOT); in TEST_F()
9449 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9450 processPosition(mapper, x2, y2); in TEST_F()
9451 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9452 processSync(mapper); in TEST_F()
9458 processSlot(mapper, SECOND_SLOT); in TEST_F()
9459 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9460 processPosition(mapper, x2, y2); in TEST_F()
9461 processSync(mapper); in TEST_F()
9467 processSlot(mapper, FIRST_SLOT); in TEST_F()
9468 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9469 processPosition(mapper, x2, y2); in TEST_F()
9470 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9471 processSync(mapper); in TEST_F()
9481 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9486 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9487 processPosition(mapper, 100, 200); in TEST_F()
9488 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9489 processSync(mapper); in TEST_F()
9494 processSlot(mapper, SECOND_SLOT); in TEST_F()
9495 processId(mapper, SECOND_TRACKING_ID); in TEST_F()
9496 processPosition(mapper, 300, 400); in TEST_F()
9497 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9498 processSync(mapper); in TEST_F()
9505 mapper.reset(ARBITRARY_TIME); in TEST_F()
9510 processPosition(mapper, 301, 302); in TEST_F()
9511 processSync(mapper); in TEST_F()
9524 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9529 processId(mapper, FIRST_TRACKING_ID); in TEST_F()
9530 processPosition(mapper, 100, 200); in TEST_F()
9531 processPressure(mapper, RAW_PRESSURE_MAX); in TEST_F()
9532 processSync(mapper); in TEST_F()
9535 processId(mapper, INVALID_TRACKING_ID); in TEST_F()
9536 processSync(mapper); in TEST_F()
9543 mapper.reset(ARBITRARY_TIME); in TEST_F()
9547 processSync(mapper); in TEST_F()
9565 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9567 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper.getSources()); in TEST_F()
9573 processPosition(mapper, 100, 100); in TEST_F()
9574 processSync(mapper); in TEST_F()
9580 processPosition(mapper, 100, 100); in TEST_F()
9581 processSync(mapper); in TEST_F()
9601 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9606 ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); in TEST_F()
9625 processSlot(mapper, 0); in TEST_F()
9626 processId(mapper, 1); in TEST_F()
9627 processPosition(mapper, 100 + RAW_X_MIN, 100 + RAW_Y_MIN); in TEST_F()
9628 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
9629 processSync(mapper); in TEST_F()
9642 processSlot(mapper, 1); in TEST_F()
9643 processId(mapper, 2); in TEST_F()
9644 processPosition(mapper, 560 + RAW_X_MIN, 154 + RAW_Y_MIN); in TEST_F()
9645 processSync(mapper); in TEST_F()
9659 processPosition(mapper, 540 + RAW_X_MIN, 690 + RAW_Y_MIN); in TEST_F()
9660 processSync(mapper); in TEST_F()
9672 processSlot(mapper, 0); in TEST_F()
9673 processPosition(mapper, 50 + RAW_X_MIN, 800 + RAW_Y_MIN); in TEST_F()
9674 processSync(mapper); in TEST_F()
9685 processKey(mapper, BTN_LEFT, 1); in TEST_F()
9686 processSync(mapper); in TEST_F()
9695 processKey(mapper, BTN_LEFT, 0); in TEST_F()
9696 processSync(mapper); in TEST_F()
9705 processId(mapper, -1); in TEST_F()
9706 processSync(mapper); in TEST_F()
9711 processSlot(mapper, 1); in TEST_F()
9712 processPosition(mapper, 320 + RAW_X_MIN, 900 + RAW_Y_MIN); in TEST_F()
9713 processSync(mapper); in TEST_F()
9724 processId(mapper, -1); in TEST_F()
9725 processKey(mapper, BTN_TOUCH, 0); in TEST_F()
9726 processSync(mapper); in TEST_F()
9734 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
9750 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9753 processId(mapper, 3); in TEST_F()
9754 processPosition(mapper, 100, 100); in TEST_F()
9755 processKey(mapper, BTN_TOUCH, 1); in TEST_F()
9756 processSync(mapper); in TEST_F()
9766 processPosition(mapper, 200, 200); in TEST_F()
9767 processSync(mapper); in TEST_F()
9791 MultiTouchInputMapper& mapper = addMapperAndConfigure<MultiTouchInputMapper>(); in TEST_F() local
9794 ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper.getSources()); in TEST_F()
9799 ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper.getSources()); in TEST_F()
9819 void processAxis(JoystickInputMapper& mapper, int32_t axis, int32_t value) { in processAxis() argument
9820 process(mapper, ARBITRARY_TIME, READ_TIME, EV_ABS, axis, value); in processAxis()
9823 void processSync(JoystickInputMapper& mapper) { in processSync() argument
9824 process(mapper, ARBITRARY_TIME, READ_TIME, EV_SYN, SYN_REPORT, 0); in processSync()
9841 JoystickInputMapper& mapper = addMapperAndConfigure<JoystickInputMapper>(); in TEST_F() local
9848 processAxis(mapper, ABS_X, 100); in TEST_F()
9849 processSync(mapper); in TEST_F()
9856 processAxis(mapper, ABS_Y, 100); in TEST_F()
9857 processSync(mapper); in TEST_F()