• Greg Spencer's avatar
    Add fake keyboard key generation to the testing framework (#40706) · 0e6cb28d
    Greg Spencer authored
    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.
    0e6cb28d
Name
Last commit
Last update
..
bindings_environment Loading commit data...
custom_exception_reporter Loading commit data...
test_config Loading commit data...
accessibility_test.dart Loading commit data...
accessibility_window_test.dart Loading commit data...
bindings_test.dart Loading commit data...
controller_test.dart Loading commit data...
event_simulation_test.dart Loading commit data...
finders_test.dart Loading commit data...
goldens_test.dart Loading commit data...
matchers_test.dart Loading commit data...
reference_image_test.dart Loading commit data...
stack_manipulation_test.dart Loading commit data...
test_async_utils_test.dart Loading commit data...
test_text_input_test.dart Loading commit data...
widget_tester_test.dart Loading commit data...
window_test.dart Loading commit data...