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

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

Issue 183653002: Fix braille backtranslation size limit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 10 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/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 f8f2ab4666b66a0caf20e745f4335e5384f09026..275f29e3d06df41eb1aadfec1cd35103297488f2 100644
--- a/chrome/test/data/chromeos/liblouis_nacl/test.js
+++ b/chrome/test/data/chromeos/liblouis_nacl/test.js
@@ -5,6 +5,7 @@
var pass = chrome.test.callbackPass;
var TABLE_NAME = 'en-us-comp8.ctb';
+var CONTRACTED_TABLE_NAME = 'en-us-g2.ctb';
var TEXT = 'hello';
// Translation of the above string as a hexadecimal sequence of cells.
var CELLS = '1311070715';
@@ -81,7 +82,7 @@ loadLibrary(function() {
// 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'},
+ rpc('Translate', { 'table_name': CONTRACTED_TABLE_NAME, 'text': 'T'},
pass(expectSuccessReply(function(reply) {
chrome.test.assertEq('30201e', reply['cells']);
})));
@@ -93,4 +94,14 @@ loadLibrary(function() {
chrome.test.assertEq(TEXT, reply['text']);
})));
},
+
+ // Backtranslate a one-letter contraction that expands to a much larger
+ // string (k->knowledge).
+ function testBackTranslateContracted() {
+ rpc('BackTranslate', { 'table_name': CONTRACTED_TABLE_NAME,
+ 'cells': '05'}, // dots 1 and 3
+ pass(expectSuccessReply(function(reply) {
+ chrome.test.assertEq('knowledge', reply['text']);
+ })));
+ },
])});

Powered by Google App Engine
This is Rietveld 408576698