mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
0e6cb28dbe
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms. This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard. |
||
---|---|---|
.. | ||
bindings_environment | ||
custom_exception_reporter | ||
test_config | ||
accessibility_test.dart | ||
accessibility_window_test.dart | ||
bindings_test.dart | ||
controller_test.dart | ||
event_simulation_test.dart | ||
finders_test.dart | ||
goldens_test.dart | ||
matchers_test.dart | ||
reference_image_test.dart | ||
stack_manipulation_test.dart | ||
test_async_utils_test.dart | ||
test_text_input_test.dart | ||
widget_tester_test.dart | ||
window_test.dart |