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 0a5566eefe33d2155878d56de6685b4e8fdb2f8c..92ac2bc890022c8d35d7bb6a82e7f34263e82b70 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs |
@@ -177,3 +177,23 @@ TEST_F('BackgroundTest', 'SelectSingleBasic', function() { |
cvox.ChromeVox.tts.finishExpectations(); |
}.bind(this)); |
}); |
+ |
+TEST_F('BackgroundTest', 'ContinuousRead', function() { |
+ cvox.ChromeVox.tts.expectSpeech('start', null, true); |
+ this.runWithDocument(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.finishExpectations(); |
+ }.bind(this)); |
+}); |