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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 GEN_INCLUDE(['../../testing/mock_tts.js']); 8 GEN_INCLUDE(['../../testing/mock_tts.js']);
9 9
10 /** 10 /**
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 var expect = cvox.ChromeVox.tts.expectSpeech.bind(cvox.ChromeVox.tts); 168 var expect = cvox.ChromeVox.tts.expectSpeech.bind(cvox.ChromeVox.tts);
169 expect('apple Menu item 1 of 3 ', sendDownToSelect, true); 169 expect('apple Menu item 1 of 3 ', sendDownToSelect, true);
170 expect('grape 2 of 3 ', sendDownToSelect, true); 170 expect('grape 2 of 3 ', sendDownToSelect, true);
171 expect('banana 3 of 3 ', testDone, true); 171 expect('banana 3 of 3 ', testDone, true);
172 cvox.ChromeVox.tts.finishExpectations(); 172 cvox.ChromeVox.tts.finishExpectations();
173 }.bind(this)); 173 }.bind(this));
174 }); 174 });
175 175
176 TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() { 176 TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() {
177 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { 177 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() {
178 var doCmd = this.doCmd.bind(this); 178 cvox.ChromeVox.tts.expectSpeech('start');
179 var expect = 179 cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead'));
180 cvox.ChromeVox.tts.expectSpeechAfter.bind(cvox.ChromeVox.tts); 180 cvox.ChromeVox.tts.expectSpeech('alpha Link');
181 var sendEndEvent = function() { 181 cvox.ChromeVox.tts.expectSpeech('beta Link');
182 window.setTimeout(function() { 182 cvox.ChromeVox.tts.expectSpeech('Heading charlie', testDone);
183 this.sendEndEvent();
184 }.bind(this), 0);
185 }.bind(cvox.ChromeVox.tts);
186
187 expect('start', doCmd('continuousRead'));
188 expect('alpha Link', sendEndEvent);
189 expect('beta Link', sendEndEvent);
190 expect('Heading charlie', sendEndEvent);
191 cvox.ChromeVox.tts.finishExpectations(); 183 cvox.ChromeVox.tts.finishExpectations();
192 }.bind(this)); 184 }.bind(this));
193 }); 185 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698