These are hard:
The mock speech class doesn't have any duration for which it is "speaking", so STS doesn't enter the "speaking" state for long enough to initiate a "cancel".
I'm also not sure the mock speech class sends the correct callbacks to the Select-to-Speak extension.
Some possible fixes:
Split the tests into two pieces, one test that verifies that clicking the tray button turns the feature on/off, and a separate test (or existing test) that verifies the feature speaks properly when internally turned on/off.
More .extjs tests
Investigate callbacks and timing of mock speech class. Can we get a callback on speech "start" and force it to wait to "continue"?
Comment 1 by bugdroid1@chromium.org
, May 10 2018