| Index: chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js b/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js
|
| index ec90c105c03f57fea8f6ff07b706170710936400..8e4ce8e7c740d5f465a8913f7241a43c6002a967 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js
|
| @@ -153,7 +153,9 @@ MockFeedback.prototype = {
|
| return !!MockFeedback.matchAndConsume_(
|
| text, {}, this.pendingUtterances_);
|
| }.bind(this),
|
| - toString: function() { return 'Speak \'' + text + '\''; }
|
| + toString: function() {
|
| + return 'Speak \'' + text + '\'';
|
| + }
|
| });
|
| }.bind(this));
|
| return this;
|
| @@ -172,7 +174,7 @@ MockFeedback.prototype = {
|
| perform: function() {
|
| return !!MockFeedback.matchAndConsume_(
|
| text, {queueMode: queueMode}, this.pendingUtterances_);
|
| - }.bind(this),
|
| + }.bind(this),
|
| toString: function() {
|
| return 'Speak \'' + text + '\' with mode ' + queueMode;
|
| }
|
| @@ -233,7 +235,9 @@ MockFeedback.prototype = {
|
| }
|
| return true;
|
| }.bind(this),
|
| - toString: function() { return 'Do not speak \'' + text + '\''; }
|
| + toString: function() {
|
| + return 'Do not speak \'' + text + '\'';
|
| + }
|
| });
|
| }.bind(this));
|
| return this;
|
| @@ -251,8 +255,8 @@ MockFeedback.prototype = {
|
| var props = opt_props || {};
|
| this.pendingActions_.push({
|
| perform: function() {
|
| - var match = MockFeedback.matchAndConsume_(
|
| - text, props, this.pendingBraille_);
|
| + var match =
|
| + MockFeedback.matchAndConsume_(text, props, this.pendingBraille_);
|
| if (match)
|
| this.lastMatchedBraille_ = match;
|
| return !!match;
|
| @@ -273,8 +277,8 @@ MockFeedback.prototype = {
|
| assertFalse(this.replaying_);
|
| this.pendingActions_.push({
|
| perform: function() {
|
| - var match = MockFeedback.matchAndConsume_(
|
| - earconName, {}, this.pendingEarcons_);
|
| + var match =
|
| + MockFeedback.matchAndConsume_(earconName, {}, this.pendingEarcons_);
|
| return !!match;
|
| }.bind(this),
|
| toString: function() {
|
| @@ -347,9 +351,7 @@ MockFeedback.prototype = {
|
| };
|
| }
|
| this.pendingUtterances_.push(
|
| - {text: textString,
|
| - queueMode: queueMode,
|
| - callback: callback});
|
| + {text: textString, queueMode: queueMode, callback: callback});
|
| this.process_();
|
| },
|
|
|
| @@ -392,8 +394,8 @@ MockFeedback.prototype = {
|
| // If there are pending actions and no matching feedback for a few
|
| // seconds, log the pending state to ease debugging.
|
| if (!this.logTimeoutId_) {
|
| - this.logTimeoutId_ = window.setTimeout(
|
| - this.logPendingState_.bind(this), 2000);
|
| + this.logTimeoutId_ =
|
| + window.setTimeout(this.logPendingState_.bind(this), 2000);
|
| }
|
| }
|
| } finally {
|
| @@ -407,15 +409,18 @@ MockFeedback.prototype = {
|
| console.log('Still waiting for ' + this.pendingActions_[0].toString());
|
| function logPending(desc, list) {
|
| if (list.length > 0)
|
| - console.log('Pending ' + desc + ':\n ' +
|
| + console.log(
|
| + 'Pending ' + desc + ':\n ' +
|
| list.map(function(i) {
|
| - var ret = '\'' + i.text + '\'';
|
| - if ('startIndex' in i)
|
| - ret += ' startIndex=' + i.startIndex;
|
| - if ('endIndex' in i)
|
| - ret += ' endIndex=' + i.endIndex;
|
| - return ret;
|
| - }).join('\n ') + '\n ');
|
| + var ret = '\'' + i.text + '\'';
|
| + if ('startIndex' in i)
|
| + ret += ' startIndex=' + i.startIndex;
|
| + if ('endIndex' in i)
|
| + ret += ' endIndex=' + i.endIndex;
|
| + return ret;
|
| + })
|
| + .join('\n ') +
|
| + '\n ');
|
| }
|
| logPending('speech utterances', this.pendingUtterances_);
|
| logPending('braille', this.pendingBraille_);
|
|
|