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

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

Issue 2917123002: Support role description in automation/ChromeVox (Closed)
Patch Set: Changes to c/c/e/a/PRESUBMIT.py Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 GEN_INCLUDE(['../../testing/assert_additions.js']); 5 GEN_INCLUDE(['../../testing/assert_additions.js']);
6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']);
7 7
8 /** 8 /**
9 * Gets the braille output and asserts that it matches expected values. 9 * Gets the braille output and asserts that it matches expected values.
10 * Annotations in the output that are primitive strings are ignored. 10 * Annotations in the output that are primitive strings are ignored.
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 checkSpeechOutput('2|Min 1|Max 10|volume|Spin button', 765 checkSpeechOutput('2|Min 1|Max 10|volume|Spin button',
766 [ 766 [
767 {value: 'valueForRange', start: 0, end: 1}, 767 {value: 'valueForRange', start: 0, end: 1},
768 {value: 'name', start: 15,end: 21}, 768 {value: 'name', start: 15,end: 21},
769 {value: new Output.EarconAction('LISTBOX'), start: 15, end: 21}, 769 {value: new Output.EarconAction('LISTBOX'), start: 15, end: 21},
770 {value: 'role', start: 22, end: 33} 770 {value: 'role', start: 22, end: 33}
771 ], 771 ],
772 o); 772 o);
773 }); 773 });
774 }); 774 });
775
776 TEST_F('OutputE2ETest', 'RoleDescription', function() {
777 this.runWithLoadedTree(function(root) {/*!
778 <div aria-label="hi" role="button" aria-roledescription="foo"></div>
779 */}, function(root) {
780 var obj = root.find({role: RoleType.BUTTON});
781 var o = new Output().withSpeech(cursors.Range.fromNode(obj));
782 checkSpeechOutput('hi|foo',
783 [
784 {value: 'name', start: 0, end: 2},
785 {value: new Output.EarconAction('BUTTON'), start: 0, end: 2},
786 {value: 'role', start: 3, end: 6}
787 ],
788 o);
789 });
790 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698