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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 mockFeedback.call(doCmd('previousCharacter')) | 185 mockFeedback.call(doCmd('previousCharacter')) |
186 .expectSpeech('a', 'Link'); | 186 .expectSpeech('a', 'Link'); |
187 mockFeedback.call(doCmd('previousCharacter')) | 187 mockFeedback.call(doCmd('previousCharacter')) |
188 .expectSpeech('t'); | 188 .expectSpeech('t'); |
189 mockFeedback.call(doCmd('nextWord')) | 189 mockFeedback.call(doCmd('nextWord')) |
190 .expectSpeech('echo', 'Link'); | 190 .expectSpeech('echo', 'Link'); |
191 mockFeedback.replay(); | 191 mockFeedback.replay(); |
192 }); | 192 }); |
193 }); | 193 }); |
194 | 194 |
195 TEST_F('BackgroundTest', 'SelectSingleBasic', function() { | |
196 var mockFeedback = this.createMockFeedback(); | |
197 this.runWithLoadedTree(this.formsDoc, function() { | |
198 var sendDownToSelect = | |
199 this.sendKeyToElement.bind(this, undefined, 'Down', '#fruitSelect'); | |
200 mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') | |
201 .expectBraille('apple btn +popup +') | |
202 .call(sendDownToSelect) | |
203 .expectSpeech('grape', /2 of 3/) | |
204 .expectBraille('grape mnuitm 2/3') | |
205 .call(sendDownToSelect) | |
206 .expectSpeech('banana', /3 of 3/) | |
207 .expectBraille('banana mnuitm 3/3'); | |
208 mockFeedback.replay(); | |
209 }); | |
210 }); | |
211 | |
212 TEST_F('BackgroundTest', 'ContinuousRead', function() { | 195 TEST_F('BackgroundTest', 'ContinuousRead', function() { |
213 var mockFeedback = this.createMockFeedback(); | 196 var mockFeedback = this.createMockFeedback(); |
214 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { | 197 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { |
215 mockFeedback.expectSpeech('start') | 198 mockFeedback.expectSpeech('start') |
216 .call(this.doCmd('readFromHere')) | 199 .call(this.doCmd('readFromHere')) |
217 .expectSpeech( | 200 .expectSpeech( |
218 'start', | 201 'start', |
219 'alpha', 'Link', | 202 'alpha', 'Link', |
220 'beta', 'Link', | 203 'beta', 'Link', |
221 'charlie', 'Heading 1'); | 204 'charlie', 'Heading 1'); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 this.runWithLoadedTree(this.iframesDoc, function(rootNode) { | 606 this.runWithLoadedTree(this.iframesDoc, function(rootNode) { |
624 chrome.automation.getDesktop(function(desktopNode) { | 607 chrome.automation.getDesktop(function(desktopNode) { |
625 runTestIfIframeIsLoaded(rootNode); | 608 runTestIfIframeIsLoaded(rootNode); |
626 | 609 |
627 desktopNode.addEventListener('loadComplete', function(evt) { | 610 desktopNode.addEventListener('loadComplete', function(evt) { |
628 runTestIfIframeIsLoaded(rootNode); | 611 runTestIfIframeIsLoaded(rootNode); |
629 }, true); | 612 }, true); |
630 }); | 613 }); |
631 }); | 614 }); |
632 }); | 615 }); |
OLD | NEW |