[TTS] Fix Tap mojo race condition and update tests.
This CL implements a workaround for the race condition between the mojo tap notification and the selection-changed notification. Now we never enter the SELECTION_CLEARED internal state unless there was a previous selection that got cleared. Before this CL every tap caused a transition to the SELECTION_CLEARED internal state even when there was no previous selection. This would usually happen before the Tap notification, but now that's faster due to mojo so it sometimes arrives beforehand. With this change we ignore selection changes from empty to empty so there's only one notification for most taps. Now we only enter the SELECTION_CLEARED state when it's really needed (in the tap near previous selection use-case). Also does some minor test cleanup and re-enabling disabled tests that were flaky. BUG=818897 Change-Id: I269815ad087aabf93332e99a6c7d1208addabe3e Reviewed-on: https://chromium-review.googlesource.com/1018300 Commit-Queue: Donn Denman <donnd@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#552439}
Showing
Please register or sign in to comment