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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 assertEquals('object', typeof(cvox)); | 63 assertEquals('object', typeof(cvox)); |
64 assertEquals('function', typeof(cvox.ChromeVoxBackground)); | 64 assertEquals('function', typeof(cvox.ChromeVoxBackground)); |
65 }); | 65 }); |
66 | 66 |
67 /** Tests that ChromeVox next is in this context. */ | 67 /** Tests that ChromeVox next is in this context. */ |
68 SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() { | 68 SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() { |
69 assertEquals('function', typeof(Background)); | 69 assertEquals('function', typeof(Background)); |
70 }); | 70 }); |
71 | 71 |
72 /** Tests feedback once a page loads. */ | 72 /** Tests feedback once a page loads. */ |
73 TEST_F('BackgroundTest', 'MANUAL_InitialFeedback', function() { | 73 TEST_F('BackgroundTest', 'InitialFeedback', function() { |
74 cvox.ChromeVox.tts.expectSpeech('start', this.newCallback()); | 74 cvox.ChromeVox.tts.expectSpeech('start', this.newCallback()); |
75 | 75 |
76 this.runWithTab(function() {/*! | 76 this.runWithTab(function() {/*! |
77 <p>start | 77 <p>start |
78 <p>end | 78 <p>end |
79 */}); | 79 */}); |
80 }); | 80 }); |
81 | 81 |
82 /** Tests consistency of navigating forward and backward. */ | 82 /** Tests consistency of navigating forward and backward. */ |
83 TEST_F('BackgroundTest', 'MANUAL_ForwardBackwardNavigation', function() { | 83 TEST_F('BackgroundTest', 'MANUAL_ForwardBackwardNavigation', function() { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 var sendDownToSelect = | 144 var sendDownToSelect = |
145 this.sendKeyToElement.bind(this, undefined, 'Down', '#fruitSelect'); | 145 this.sendKeyToElement.bind(this, undefined, 'Down', '#fruitSelect'); |
146 var expect = cvox.ChromeVox.tts.expectSpeech.bind(cvox.ChromeVox.tts); | 146 var expect = cvox.ChromeVox.tts.expectSpeech.bind(cvox.ChromeVox.tts); |
147 expect('apple Menu item 1 of 3 ', sendDownToSelect, true); | 147 expect('apple Menu item 1 of 3 ', sendDownToSelect, true); |
148 expect('grape 2 of 3 ', sendDownToSelect, true); | 148 expect('grape 2 of 3 ', sendDownToSelect, true); |
149 expect('banana 3 of 3 ', function() {}, true); | 149 expect('banana 3 of 3 ', function() {}, true); |
150 cvox.ChromeVox.tts.finishExpectations(this.newCallback()); | 150 cvox.ChromeVox.tts.finishExpectations(this.newCallback()); |
151 }); | 151 }); |
152 }); | 152 }); |
153 | 153 |
154 TEST_F('BackgroundTest', 'MANUAL_ContinuousRead', function() { | 154 TEST_F('BackgroundTest', 'ContinuousRead', function() { |
155 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { | 155 this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { |
156 cvox.ChromeVox.tts.expectSpeech('start'); | 156 cvox.ChromeVox.tts.expectSpeech('start'); |
157 cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead')); | 157 cvox.ChromeVox.tts.expectSpeechAfter('start', this.doCmd('continuousRead')); |
158 cvox.ChromeVox.tts.expectSpeech('alpha'); | 158 cvox.ChromeVox.tts.expectSpeech('alpha'); |
159 cvox.ChromeVox.tts.expectSpeech('Link'); | 159 cvox.ChromeVox.tts.expectSpeech('Link'); |
160 cvox.ChromeVox.tts.expectSpeech('beta'); | 160 cvox.ChromeVox.tts.expectSpeech('beta'); |
161 cvox.ChromeVox.tts.expectSpeech('Link'); | 161 cvox.ChromeVox.tts.expectSpeech('Link'); |
162 cvox.ChromeVox.tts.expectSpeech('Heading 1'); | 162 cvox.ChromeVox.tts.expectSpeech('Heading 1'); |
163 cvox.ChromeVox.tts.expectSpeech('charlie'); | 163 cvox.ChromeVox.tts.expectSpeech('charlie'); |
164 cvox.ChromeVox.tts.finishExpectations(); | 164 cvox.ChromeVox.tts.finishExpectations(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 }); | 229 }); |
230 | 230 |
231 TEST_F('BackgroundTest', 'AriaLabel', function() { | 231 TEST_F('BackgroundTest', 'AriaLabel', function() { |
232 this.runWithLoadedTree('<a aria-label="foo" href="a">a</a>', | 232 this.runWithLoadedTree('<a aria-label="foo" href="a">a</a>', |
233 function(rootNode) { | 233 function(rootNode) { |
234 cvox.ChromeVox.tts.expectSpeech('foo link', testDone); | 234 cvox.ChromeVox.tts.expectSpeech('foo link', testDone); |
235 | 235 |
236 rootNode.focus(); | 236 rootNode.focus(); |
237 }.bind(this)); | 237 }.bind(this)); |
238 }); | 238 }); |
OLD | NEW |