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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Move another braille message to Msgs.Untranslated Created 5 years, 3 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/cvox2/background/output_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
index c7d400ac015b679d89703c203ed42f289746e78b..ad642ed0e50f3fac32d7db146e9440a999f107be 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
@@ -244,6 +244,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
'<input type="number"></input>' +
'<input type="time"></input>' +
'<input type="date"></input>' +
+ '<input type="file"</input>' +
+ '<input type="search"</input>' +
'<input type="invalidType"</input>',
function(root) {
var expected = {string_: '', 'spans_': [
@@ -263,7 +265,7 @@ TEST_F('OutputE2ETest', 'Input', function() {
'||Edit text',
'||Edit text, email entry',
'||Password edit text',
- '||Edit text, number entry',
+ '||Edit text numeric only',
{string_: '||Spin button', spans_: [{value: 'name', start: 0, end: 0},
{value: {earconId:'LISTBOX'}, start: 0, end: 0},
{value: {startIndex: 0, endIndex: 0}, start: 1, end: 1},
@@ -275,7 +277,13 @@ TEST_F('OutputE2ETest', 'Input', function() {
{string_: '||Date control', spans_: [{value: 'name', start: 0, end: 0},
{value: 'value', start: 1, end: 1},
{value: 'role', start: 2, end: 14}]},
- "||Edit text"
+ {string_: 'Choose File|No file chosen|Button',
+ spans_: [{value: 'name', start: 0, end: 11},
+ {value: {earconId: "BUTTON"}, start: 0, end: 11},
+ {value: 'value', start: 12, end: 26},
+ {value: 'role', start: 27, end: 33}]},
+ '||Edit text, search entry',
+ '||Edit text'
];
// TODO(plundblad): Some of these are wrong, there should be an initial
// space for the cursor in edit fields.
@@ -287,6 +295,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
' spnbtn',
{string_: 'time'},
{string_: 'date'},
+ {string_: 'Choose File No file chosen btn'},
+ ' srched',
' ed'
];
assertEquals(expectedSpeechValues.length, expectedBrailleValues.length);
@@ -488,8 +498,8 @@ TEST_F('OutputE2ETest', 'ListBox', function() {
SYNC_TEST_F('OutputE2ETest', 'MessageIdAndEarconValidity', function() {
for (var key in Output.ROLE_INFO_) {
var value = Output.ROLE_INFO_[key];
- cvox.ChromeVox.msgs.getMsg(value.msgId);
- cvox.ChromeVox.msgs.getMsg(value.msgId + '_brl');
+ Msgs.getMsg(value.msgId);
+ Msgs.getMsg(value.msgId + '_brl');
assertFalse(/[A-Z]+/.test(value.msgId));
if (value.earconId)
assertNotNullNorUndefined(cvox.Earcon[value.earconId]);
@@ -498,13 +508,19 @@ SYNC_TEST_F('OutputE2ETest', 'MessageIdAndEarconValidity', function() {
var value = Output.STATE_INFO_[key];
for (innerKey in value) {
var innerValue = value[innerKey];
- cvox.ChromeVox.msgs.getMsg(innerValue.msgId);
- cvox.ChromeVox.msgs.getMsg(innerValue.msgId + '_brl');
+ Msgs.getMsg(innerValue.msgId);
+ Msgs.getMsg(innerValue.msgId + '_brl');
assertFalse(/[A-Z]+/.test(innerValue.msgId));
if (innerValue.earconId)
assertNotNullNorUndefined(cvox.Earcon[innerValue.earconId]);
}
}
+ for (var key in Output.INPUT_TYPE_MESSAGE_IDS_) {
+ var msgId = Output.INPUT_TYPE_MESSAGE_IDS_[key];
+ assertFalse(/[A-Z]+/.test(msgId));
+ Msgs.getMsg(msgId);
+ Msgs.getMsg(msgId + '_brl');
+ }
});
TEST_F('OutputE2ETest', 'DivOmitsRole', function() {

Powered by Google App Engine
This is Rietveld 408576698