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

Unified Diff: chrome/test/data/chromeos/liblouis_nacl/test.js

Issue 124403002: Allow braille translation result to be larger than twice the size of the input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Comment fix Created 6 years, 11 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
« no previous file with comments | « no previous file | third_party/liblouis/nacl_wrapper/liblouis_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chromeos/liblouis_nacl/test.js
diff --git a/chrome/test/data/chromeos/liblouis_nacl/test.js b/chrome/test/data/chromeos/liblouis_nacl/test.js
index d7b9806a086abf945f03e7d57c52ab53fd7c47aa..f8f2ab4666b66a0caf20e745f4335e5384f09026 100644
--- a/chrome/test/data/chromeos/liblouis_nacl/test.js
+++ b/chrome/test/data/chromeos/liblouis_nacl/test.js
@@ -42,7 +42,7 @@ function rpc(command, args, callback) {
var messageId = '' + nextMessageId++;
args['command'] = command;
args['message_id'] = messageId;
- var json = JSON.stringify(args)
+ var json = JSON.stringify(args);
console.log('Message to liblouis: ' + json);
naclEmbed.postMessage(json);
pendingCallback = callback;
@@ -76,6 +76,17 @@ loadLibrary(function() {
})));
},
+ // Regression test for the case where the translated result is more than
+ // the double size of the input. In this particular case, a single capital
+ // letter 'T' should be translated to 3 cells in US English grade 2
+ // braille (dots 56, 6, 2345).
+ function testTranslateGrade2SingleCapital() {
+ rpc('Translate', { 'table_name': 'en-us-g2.ctb', 'text': 'T'},
+ pass(expectSuccessReply(function(reply) {
+ chrome.test.assertEq('30201e', reply['cells']);
+ })));
+ },
+
function testBackTranslateString() {
rpc('BackTranslate', { 'table_name': TABLE_NAME, 'cells': CELLS},
pass(expectSuccessReply(function(reply) {
« no previous file with comments | « no previous file | third_party/liblouis/nacl_wrapper/liblouis_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698