Siarhei Vishniakou
authored
This test will provide RawEvent's to TouchpadInputMapper and will look at the returned events. The main purpose of this CL is to document the existing behaviour of CursorInputMapper and TouchpadInputMapper. The tests highlights that today, dispatcher must handle the case where the touch starts without HOVER_EXIT. That means that the dispatcher logs of "conflicting pointer actions" can be mostly ignored. The goal was to make the tests for the two mappers as similar to each other as possible. A slightly different testing infra is introduced here compared to the one used in InputReader_test. Changes: * Use mocks for interfaces instead of constructed objects This helps figure out which parts are important to mock for a specific test vs which ones are not. When a function is called with a parameters that the mocks aren't expecting, a warning is printed during test run. This helps identify the complete state needed in order for the test to execute. * No longer require InstrumentedInputReader * No longer require a listener. We only check the events that are coming from the 'process' call, which is what the interface for the mapper does. Limitations: * Still require an InputDevice object to be constructed in order to test InputMappers. Ideally, a mapper would only depend on the EventHub state (to read the current value of keys / axes after a reset). Bug: 263319225 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*HoverAndLeftButtonPress*" Change-Id: I7de0dee7abcf6bcb9d3283e29d9a85de2f331a44
Name | Last commit | Last update |
---|---|---|
.. |