Index: chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs |
diff --git a/chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs b/chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs |
index 38d1e4b92db833eab32d6e576e78d2ffce5a905c..90c6da9045b41bd0ae4aaa5c9199ead33816b924 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs |
+++ b/chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs |
@@ -166,3 +166,25 @@ TEST_F('CvoxLibLouisTest', 'testDetachWithOutstandingCallbacks', function() { |
liblouis.detach(); |
}); |
}); |
+ |
+TEST_F('CvoxLibLouisTest', 'testKeyEventStaticData', function() { |
+ var liblouis = this.createAndAttachLiblouis(); |
+ this.withTranslator(liblouis, 'en-us-comp8.ctb', function(translator) { |
+ translator.translate('abcdefghijklmnopqrstuvwxyz 0123456789', |
+ this.newCallback( |
+ function(cells, textToBraille, brailleToText) { |
+ // A-Z. |
+ var view = new Uint8Array(cells); |
+ for (var i = 0; i < 26; i++) { |
+ assertEquals(String.fromCharCode(i + 65), |
+ cvox.BrailleKeyEvent.brailleDotsToStandardKeyCode[view[i]]); |
+ } |
+ |
+ // 0-9. |
+ for (var i = 27; i < 37; i++) { |
+ assertEquals(String.fromCharCode(i + 21), |
+ cvox.BrailleKeyEvent.brailleDotsToStandardKeyCode[view[i]]); |
+ } |
+ })); |
+ }); |
+}); |