Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6183)

Unified Diff: chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs

Issue 536233002: Begin introducing some of the initial pieces for ChromeVox next commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromeos_conversions
Patch Set: Rebase. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
index f295ee6af56406d33224ce5b46d7f63b2b83867b..74abf72bf972b11e7f06d1af5494fb2e6cece00b 100644
--- a/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
+++ b/chrome/browser/resources/chromeos/chromevox2/cvox2/background/background.extjs
@@ -45,7 +45,7 @@ MockTts.prototype = {
* @return {boolean} True if the string was spoken (possibly as part of a
* larger utterance).
*/
- checkIfTextWasSpoken: function(textString) {
+ checkIfSubstringWasSpoken: function(textString) {
return this.utterances.some(function(t) {
return t.indexOf(textString) != -1;
});
@@ -68,7 +68,8 @@ SYNC_TEST_F('BackgroundTest', 'NextNamespaces', function() {
TEST_F('BackgroundTest', 'DesktopFocus', function() {
function findStatusTray(root) {
if (root.role == chrome.automation.RoleType.button &&
- root.attributes.name == 'Status tray') {
+ root.attributes.name &&
+ root.attributes.name.indexOf('Status tray') != -1) {
return root;
}
for (var i = 0; i < root.children().length; i++) {
@@ -84,7 +85,7 @@ TEST_F('BackgroundTest', 'DesktopFocus', function() {
testButton.addEventListener(chrome.automation.EventType.focus,
function(e) {
var result =
- cvox.ChromeVox.tts.checkIfTextWasSpoken('Status tray button');
+ cvox.ChromeVox.tts.checkIfSubstringWasSpoken('Status tray');
testDone([result, '']);
},
true);

Powered by Google App Engine
This is Rietveld 408576698