• 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
..
_binding_io.dart Loading commit data...
_binding_web.dart Loading commit data...
_goldens_io.dart Loading commit data...
_goldens_web.dart Loading commit data...
accessibility.dart Loading commit data...
all_elements.dart Loading commit data...
binding.dart Loading commit data...
controller.dart Loading commit data...
event_simulation.dart Loading commit data...
finders.dart Loading commit data...
goldens.dart Loading commit data...
matchers.dart Loading commit data...
nonconst.dart Loading commit data...
platform.dart Loading commit data...
stack_manipulation.dart Loading commit data...
test_async_utils.dart Loading commit data...
test_compat.dart Loading commit data...
test_exception_reporter.dart Loading commit data...
test_pointer.dart Loading commit data...
test_text_input.dart Loading commit data...
test_vsync.dart Loading commit data...
widget_tester.dart Loading commit data...
window.dart Loading commit data...