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 '../../testing/assert_additions.js']); | 7 '../../testing/assert_additions.js']); |
8 | 8 |
9 GEN_INCLUDE(['../../testing/mock_feedback.js']); | 9 GEN_INCLUDE(['../../testing/mock_feedback.js']); |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 .expectSpeech('t'); | 212 .expectSpeech('t'); |
213 mockFeedback.call(doCmd('nextWord')) | 213 mockFeedback.call(doCmd('nextWord')) |
214 .expectSpeech('echo', 'Link'); | 214 .expectSpeech('echo', 'Link'); |
215 mockFeedback.replay(); | 215 mockFeedback.replay(); |
216 }); | 216 }); |
217 }); | 217 }); |
218 | 218 |
219 TEST_F('BackgroundTest', 'SelectSingleBasic', function() { | 219 TEST_F('BackgroundTest', 'SelectSingleBasic', function() { |
220 var mockFeedback = this.createMockFeedback(); | 220 var mockFeedback = this.createMockFeedback(); |
221 this.runWithLoadedTree(this.formsDoc, function() { | 221 this.runWithLoadedTree(this.formsDoc, function() { |
222 var sendDownToSelect = | 222 var incrementSelectedIndex = |
223 this.sendKeyToElement.bind(this, undefined, 'ArrowDown', '#fruitSelect')
; | 223 this.incrementSelectedIndex.bind(this, undefined, '#fruitSelect'); |
224 mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') | 224 mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') |
225 .expectBraille('apple btn +popup +') | 225 .expectBraille('apple btn +popup +') |
226 .call(sendDownToSelect) | 226 .call(incrementSelectedIndex) |
227 .expectSpeech('grape', /2 of 3/) | 227 .expectSpeech('grape', /2 of 3/) |
228 .expectBraille('grape mnuitm 2/3') | 228 .expectBraille('grape mnuitm 2/3') |
229 .call(sendDownToSelect) | 229 .call(incrementSelectedIndex) |
230 .expectSpeech('banana', /3 of 3/) | 230 .expectSpeech('banana', /3 of 3/) |
231 .expectBraille('banana mnuitm 3/3'); | 231 .expectBraille('banana mnuitm 3/3'); |
232 mockFeedback.replay(); | 232 mockFeedback.replay(); |
233 }); | 233 }); |
234 }); | 234 }); |
235 | 235 |
236 TEST_F('BackgroundTest', 'ContinuousRead', function() { | 236 TEST_F('BackgroundTest', 'ContinuousRead', function() { |
237 var mockFeedback = this.createMockFeedback(); | 237 var mockFeedback = this.createMockFeedback(); |
238 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { | 238 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { |
239 mockFeedback.expectSpeech('start') | 239 mockFeedback.expectSpeech('start') |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 */}, function(root) { | 923 */}, function(root) { |
924 mockFeedback.call(doCmd('nextHeading')) | 924 mockFeedback.call(doCmd('nextHeading')) |
925 .expectNextSpeechUtteranceIsNot('NE') | 925 .expectNextSpeechUtteranceIsNot('NE') |
926 .expectSpeech('NW') | 926 .expectSpeech('NW') |
927 .call(doCmd('previousHeading')) | 927 .call(doCmd('previousHeading')) |
928 .expectNextSpeechUtteranceIsNot('NE') | 928 .expectNextSpeechUtteranceIsNot('NE') |
929 .expectSpeech('NW') | 929 .expectSpeech('NW') |
930 .replay(); | 930 .replay(); |
931 }); | 931 }); |
932 }); | 932 }); |
OLD | NEW |