| 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 goog.provide('cvox.ChromeVoxTester'); | 5 goog.provide('cvox.ChromeVoxTester'); |
| 6 | 6 |
| 7 goog.require('cvox.AbstractBraille'); | 7 goog.require('cvox.AbstractBraille'); |
| 8 goog.require('cvox.AbstractEarcons'); | 8 goog.require('cvox.AbstractEarcons'); |
| 9 goog.require('cvox.ChromeVoxEventWatcher'); | 9 goog.require('cvox.ChromeVoxEventWatcher'); |
| 10 goog.require('cvox.ChromeVoxUserCommands'); | 10 goog.require('cvox.ChromeVoxUserCommands'); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 * All calls to tts.speak are saved in an array of utterances. | 77 * All calls to tts.speak are saved in an array of utterances. |
| 78 * Clear any utterances that were saved up to this poing. | 78 * Clear any utterances that were saved up to this poing. |
| 79 */ | 79 */ |
| 80 cvox.ChromeVoxTester.clearUtterances = function() { | 80 cvox.ChromeVoxTester.clearUtterances = function() { |
| 81 cvox.ChromeVoxTester.testTts_.clearUtterances(); | 81 cvox.ChromeVoxTester.testTts_.clearUtterances(); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Return a list of strings of what was spoken by tts.speak(). | 86 * Return a list of strings of what was spoken by tts.speak(). |
| 87 * @return {Array.<string>} A list of all utterances spoken since | 87 * @return {Array<string>} A list of all utterances spoken since |
| 88 * initialization or the last call to clearUtterances. | 88 * initialization or the last call to clearUtterances. |
| 89 */ | 89 */ |
| 90 cvox.ChromeVoxTester.getUtteranceList = function() { | 90 cvox.ChromeVoxTester.getUtteranceList = function() { |
| 91 return cvox.ChromeVoxTester.testTts_.getUtteranceList(); | 91 return cvox.ChromeVoxTester.testTts_.getUtteranceList(); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * @type {Object.<string, number>} Map from a navigation strategy name | 95 * @type {Object<string, number>} Map from a navigation strategy name |
| 96 * to the Navigation Manager strategy enum. | 96 * to the Navigation Manager strategy enum. |
| 97 */ | 97 */ |
| 98 cvox.ChromeVoxTester.STRATEGY_MAP = { | 98 cvox.ChromeVoxTester.STRATEGY_MAP = { |
| 99 'lineardom': cvox.NavigationShifter.GRANULARITIES.OBJECT, | 99 'lineardom': cvox.NavigationShifter.GRANULARITIES.OBJECT, |
| 100 'smart': cvox.NavigationShifter.GRANULARITIES.GROUP, | 100 'smart': cvox.NavigationShifter.GRANULARITIES.GROUP, |
| 101 'selection': cvox.NavigationShifter.GRANULARITIES.SENTENCE | 101 'selection': cvox.NavigationShifter.GRANULARITIES.SENTENCE |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Switches to a different navigation strategy. | 105 * Switches to a different navigation strategy. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 129 cvox.ChromeVox.navigationManager.sync(); | 129 cvox.ChromeVox.navigationManager.sync(); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 /** | 132 /** |
| 133 * Syncs to the first node in the test. | 133 * Syncs to the first node in the test. |
| 134 */ | 134 */ |
| 135 cvox.ChromeVoxTester.syncToFirstNode = function() { | 135 cvox.ChromeVoxTester.syncToFirstNode = function() { |
| 136 cvox.ChromeVox.navigationManager.updateSel(cvox.CursorSelection.fromBody()); | 136 cvox.ChromeVox.navigationManager.updateSel(cvox.CursorSelection.fromBody()); |
| 137 cvox.ChromeVox.navigationManager.sync(); | 137 cvox.ChromeVox.navigationManager.sync(); |
| 138 }; | 138 }; |
| OLD | NEW |