Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3767)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs

Issue 955643006: Allows endCallbacks in tts to queue up speech in the speech queue and simplify speech output logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index 27fba15f135789f6086a2acf0b729204add6b484..9c4b435606157e79f7a48d35bf76714a5b247ee2 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -175,19 +175,11 @@ TEST_F('BackgroundTest', 'DISABLED_SelectSingleBasic', function() {
TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() {
this.runWithLoadedTree(this.linksAndHeadingsDoc, function() {
- var doCmd = this.doCmd.bind(this);
- var expect =
- cvox.ChromeVox.tts.expectSpeechAfter.bind(cvox.ChromeVox.tts);
- var sendEndEvent = function() {
- window.setTimeout(function() {
- this.sendEndEvent();
- }.bind(this), 0);
- }.bind(cvox.ChromeVox.tts);
-
- expect('start', doCmd('continuousRead'));
- expect('alpha Link', sendEndEvent);
- expect('beta Link', sendEndEvent);
- expect('Heading charlie', sendEndEvent);
+ cvox.ChromeVox.tts.expectSpeech('start');
+ cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead'));
+ cvox.ChromeVox.tts.expectSpeech('alpha Link');
+ cvox.ChromeVox.tts.expectSpeech('beta Link');
+ cvox.ChromeVox.tts.expectSpeech('Heading charlie', testDone);
cvox.ChromeVox.tts.finishExpectations();
}.bind(this));
});

Powered by Google App Engine
This is Rietveld 408576698