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

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

Issue 1371483003: cvox2: Avoid uncaught exception on invalid input type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8a1c61abb8e07f5378e07454a1f51e61b3c53b4..d9c833014a3e94f5be37c0a1cd996f52a391c8ef 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
@@ -243,7 +243,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
'<input type="tel"></input>' +
'<input type="number"></input>' +
'<input type="time"></input>' +
- '<input type="date"></input>',
+ '<input type="date"></input>' +
+ '<input type="invalidType"</input',
dmazzoni 2015/09/24 22:12:46 nit: missing closing angle bracket
function(root) {
var expected = {string_: '', 'spans_': [
{value: 'name', start: 0, end: 0},
@@ -254,7 +255,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
// Selection span.
{value: {startIndex: 0, endIndex: 0}, start: 1, end: 1},
- {value: 'value', start: 1, end: 1}
+ {value: 'value', start: 1, end: 1},
+ {value: 'inputType', start: 2}
]};
var expectedSpeechValues = [
@@ -272,7 +274,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
{value: 'role', start: 2, end: 14}]},
{string_: '||Date control', spans_: [{value: 'name', start: 0, end: 0},
{value: 'value', start: 1, end: 1},
- {value: 'role', start: 2, end: 14}]}
+ {value: 'role', start: 2, end: 14}]},
+ "||Edit text"
];
// TODO(plundblad): Some of these are wrong, there should be an initial
// space for the cursor in edit fields.
@@ -283,7 +286,8 @@ TEST_F('OutputE2ETest', 'Input', function() {
' #ed',
' spnbtn',
{string_: 'time'},
- {string_: 'date'}
+ {string_: 'date'},
+ ' ed'
];
assertEquals(expectedSpeechValues.length, expectedBrailleValues.length);
@@ -295,6 +299,7 @@ TEST_F('OutputE2ETest', 'Input', function() {
assertEqualsJSON(expectedValue, o.speechOutputForTest);
} else {
expected.string_ = expectedValue;
+ expected.spans_[4].end = expectedValue.length;
assertEqualsJSON(expected, o.speechOutputForTest);
}
el = el.nextSibling;
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698