Handle overlapping uses of MockWebSpeechRecognizer.
More than one speech recognition object may exist at the same time, all sharing a single MockWebSpeechRecognizer underneath when running layout tests. Overlapping uses of speech recognizer objects weren't something the mock object was designed to gracefully handle, hence fuzzer inputs would leave the mock object in an invalid state and crash, when they attempted to do so. Rather than try to ignore and prevent overlapping uses from going ahed, we extend MockWebSpeechRecognizer with support for handling them, queueing recognizer context switching tasks that will run upon completion of the currently ongoing sequence of tasks that a speech recognizer object expects. R= BUG=668019 Review-Url: https://codereview.chromium.org/2525933002 Cr-Commit-Position: refs/heads/master@{#434777}
Showing
Please register or sign in to comment