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

Unified Diff: chrome/browser/resources/chromeos/chromevox/braille/liblouis.js

Issue 938623003: Fix ChromeVox next tests to fail instead of timing out where applicable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify async callback handling in the tests. Created 5 years, 9 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/chromevox/braille/liblouis.js
diff --git a/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js b/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
index efa3e11ed8365cab55d5ed172334007a4e37f342..2d66b84de3d1de4a99338fab1456b9c50a63a7cc 100644
--- a/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
+++ b/chrome/browser/resources/chromeos/chromevox/braille/liblouis.js
@@ -235,6 +235,7 @@ cvox.LibLouis.Translator = function(instance, tableNames) {
cvox.LibLouis.Translator.prototype.translate = function(text, callback) {
if (!this.instance_.isAttached()) {
callback(null /*cells*/, null /*textToBraille*/, null /*brailleToText*/);
+ return;
}
var message = { 'table_names': this.tableNames_, 'text': text };
this.instance_.rpc_('Translate', message, function(reply) {
@@ -268,6 +269,7 @@ cvox.LibLouis.Translator.prototype.backTranslate =
function(cells, callback) {
if (!this.instance_.isAttached()) {
callback(null /*text*/);
+ return;
}
if (cells.byteLength == 0) {
// liblouis doesn't handle empty input, so handle that trivially

Powered by Google App Engine
This is Rietveld 408576698