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

Unified Diff: chrome/browser/resources/chromeos/chromevox/braille/liblouis_test.extjs

Issue 2817313002: Support braille dot or chorded typing conversions to standard keyboard keys (Closed)
Patch Set: Address feedback. Created 3 years, 8 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_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]]);
+ }
+ }));
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698