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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js

Issue 2903973002: Rich editable text implementation using spannables (Closed)
Patch Set: Make boolean expressions explicit. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview This file contains the |MockFeedback| class which is 6 * @fileoverview This file contains the |MockFeedback| class which is
7 * a combined mock class for speech, braille, and earcon feedback. A 7 * a combined mock class for speech, braille, and earcon feedback. A
8 * test that uses this class may add expectations for speech 8 * test that uses this class may add expectations for speech
9 * utterances, braille display content to be output, and earcons 9 * utterances, braille display content to be output, and earcons
10 * played (by name). The |install| method sets appropriate mock 10 * played (by name). The |install| method sets appropriate mock
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return this.lastMatchedBraille_; 330 return this.lastMatchedBraille_;
331 }, 331 },
332 332
333 /** 333 /**
334 * @param {string} textString 334 * @param {string} textString
335 * @param {cvox.QueueMode} queueMode 335 * @param {cvox.QueueMode} queueMode
336 * @param {Object=} properties 336 * @param {Object=} properties
337 * @private 337 * @private
338 */ 338 */
339 addUtterance_: function(textString, queueMode, properties) { 339 addUtterance_: function(textString, queueMode, properties) {
340 console.log('speak!'+textString);
341 var callback; 340 var callback;
342 if (properties && (properties.startCallback || properties.endCallback)) { 341 if (properties && (properties.startCallback || properties.endCallback)) {
343 var startCallback = properties.startCallback; 342 var startCallback = properties.startCallback;
344 var endCallback = properties.endCallback; 343 var endCallback = properties.endCallback;
345 callback = function() { 344 callback = function() {
346 startCallback && startCallback(); 345 startCallback && startCallback();
347 endCallback && endCallback(); 346 endCallback && endCallback();
348 }; 347 };
349 } 348 }
350 this.pendingUtterances_.push( 349 this.pendingUtterances_.push(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 453 }
455 if (candidate) { 454 if (candidate) {
456 var consumed = pending.splice(0, i + 1); 455 var consumed = pending.splice(0, i + 1);
457 consumed.forEach(function(item) { 456 consumed.forEach(function(item) {
458 if (item.callback) 457 if (item.callback)
459 item.callback(); 458 item.callback();
460 }); 459 });
461 } 460 }
462 return candidate; 461 return candidate;
463 }; 462 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd ('k') | chrome/common/extensions/api/automation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698