| 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 f74f4a2b389e52f58ef10f7e60076fdd2c22fc71..8f40e6245e3214bacebc6cb52f9e1a32d8c1ffa2 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
|
| @@ -100,6 +100,7 @@ OutputE2ETest.prototype = {
|
| /** @override */
|
| setUp: function() {
|
| window.Dir = AutomationUtil.Dir;
|
| + window.RoleType = chrome.automation.RoleType;
|
| this.forceContextualLastOutput();
|
| }
|
| };
|
| @@ -235,16 +236,18 @@ TEST_F('OutputE2ETest', 'Audio', function() {
|
| var prevRange = range;
|
| range = cursors.Range.fromNode(el);
|
| var o = new Output().withSpeechAndBraille(range, prevRange, 'navigate');
|
| - checkSpeechOutput('|0, , slider|audio time scrubber',
|
| + checkSpeechOutput('0|Min 0|Max 0||Slider|audio time scrubber',
|
| [
|
| - {value: new Output.EarconAction('SLIDER'), start: 0, end: 0},
|
| - {value: 'description', start: 13, end: 32}
|
| + {value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 14, end: 14},
|
| + {value: new Output.EarconAction('SLIDER'), start: 14, end: 14},
|
| + {value: 'role', start: 15, end: 21},
|
| + {value: 'description', start: 22, end: 41}
|
| ],
|
| o);
|
| - // TODO(plundblad): Investigate this.
|
| checkBrailleOutput(
|
| - '0, , slider audio time scrubber',
|
| - [{value: new Output.NodeSpan(el), start: 0, end: 31}],
|
| + '0 min:0 max:0 sldr audio time scrubber',
|
| + [{value: new Output.NodeSpan(el), start: 0, end: 38}],
|
| o);
|
| });
|
| });
|
| @@ -275,12 +278,11 @@ TEST_F('OutputE2ETest', 'Input', function() {
|
| '||Edit text, email entry',
|
| '||Password edit text',
|
| '||Edit text numeric only',
|
| - ['||Spin button',
|
| - [{value: 'name', start: 0, end: 0},
|
| - {value: new Output.EarconAction('LISTBOX'), start: 0, end: 0},
|
| - {value: {startIndex: 0, endIndex: 0}, start: 1, end: 1},
|
| - {value: 'value', start: 1, end: 1},
|
| - {value: 'role', start: 2, end: 13}]
|
| + ['0|Min 0|Max 0||Spin button',
|
| + [{value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 14, end: 14},
|
| + {value: new Output.EarconAction('LISTBOX'), start: 14, end: 14},
|
| + {value: 'role', start: 15, end: 26}]
|
| ],
|
| ['Time control',
|
| [{value: 'role', start: 0, end: 12}]
|
| @@ -304,7 +306,7 @@ TEST_F('OutputE2ETest', 'Input', function() {
|
| ' @ed',
|
| ' pwded',
|
| ' #ed',
|
| - ' spnbtn',
|
| + {string_: '0 min:0 max:0 spnbtn'},
|
| {string_: 'time'},
|
| {string_: 'date'},
|
| {string_: 'Choose File No file chosen btn'},
|
| @@ -712,3 +714,59 @@ TEST_F('OutputE2ETest', 'BrailleAncestry', function() {
|
| o);
|
| });
|
| });
|
| +
|
| +TEST_F('OutputE2ETest', 'RangeOutput', function() {
|
| + this.runWithLoadedTree(function(root) {/*!
|
| + <div role="slider" aria-valuemin="1" aria-valuemax="10" aria-valuenow="2"
|
| + aria-label="volume"></div>
|
| + <progress aria-valuemin="1" aria-valuemax="10"
|
| + aria-valuenow="2" aria-label="volume"></progress>
|
| + <meter aria-valuemin="1" aria-valuemax="10" aria-valuenow="2"
|
| + aria-label="volume"></meter>
|
| + <div role="spinbutton" aria-valuemin="1" aria-valuemax="10"
|
| + aria-valuenow="2" aria-label="volume"></div>
|
| + */}, function(root) {
|
| +
|
| + var obj = root.find({role: RoleType.slider});
|
| + var o = new Output().withSpeech(cursors.Range.fromNode(obj));
|
| + checkSpeechOutput('2|Min 1|Max 10|volume|Slider',
|
| + [
|
| + {value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 15,end: 21},
|
| + {value: new Output.EarconAction('SLIDER'), start: 15, end: 21},
|
| + {value: 'role', start: 22, end: 28}
|
| + ],
|
| + o);
|
| +
|
| + obj = root.find({role: RoleType.progressIndicator});
|
| + o = new Output().withSpeech(cursors.Range.fromNode(obj));
|
| + checkSpeechOutput('2|Min 1|Max 10|volume|Progress indicator',
|
| + [
|
| + {value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 15,end: 21},
|
| + {value: 'role', start: 22, end: 40}
|
| + ],
|
| + o);
|
| +
|
| + obj = root.find({role: RoleType.meter});
|
| + o = new Output().withSpeech(cursors.Range.fromNode(obj));
|
| + checkSpeechOutput('2|Min 1|Max 10|volume|Meter',
|
| + [
|
| + {value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 15,end: 21},
|
| + {value: 'role', start: 22, end: 27}
|
| + ],
|
| + o);
|
| +
|
| + obj = root.find({role: RoleType.spinButton});
|
| + o = new Output().withSpeech(cursors.Range.fromNode(obj));
|
| + checkSpeechOutput('2|Min 1|Max 10|volume|Spin button',
|
| + [
|
| + {value: 'valueForRange', start: 0, end: 1},
|
| + {value: 'name', start: 15,end: 21},
|
| + {value: new Output.EarconAction('LISTBOX'), start: 15, end: 21},
|
| + {value: 'role', start: 22, end: 33}
|
| + ],
|
| + o);
|
| + });
|
| +});
|
|
|