OLD | NEW |
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 Loading... |
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 }); |
OLD | NEW |