Added automated tests for editable text navigation with Switch Access
on Chrome OS

Added basic functionality tests for each of the public methods in
text_navigation_manager.js (jumpToBeginning, jumpToEnd,
moveBackwardOneChar, moveBackwardOneWord, moveDownOneLine,
moveForwardOneChar, moveForwardOneWord, moveUpOneLine). Note
that the tests assume that the implementation of these
actions directly changes the position of the text caret to the
intended index (with no intermediate movements of the caret).
This assumption was made to help eliminate flakiness of the event
listeners in the tests.

Test: Use --gtest_filter="*SwitchAccessTextNavigationManagerTest*"
to run only these tests.

Bug: 982004
Change-Id: I2a7f817a22157ee14541d002c7e4bf8cc6d72501
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706396
Reviewed-by: Katie Dektar <katie@chromium.org>
Reviewed-by: Anastasia Helfinstein <anastasi@google.com>
Commit-Queue: Sophie Yang <sophyang@google.com>
Cr-Commit-Position: refs/heads/master@{#679670}
2 files changed