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

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

Issue 2069543004: Adjust output rules related menus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 TEST_F('OutputE2ETest', 'Menu', function() { 444 TEST_F('OutputE2ETest', 'Menu', function() {
445 this.runWithLoadedTree(function() {/*! 445 this.runWithLoadedTree(function() {/*!
446 <div role="menu"> 446 <div role="menu">
447 <div role="menuitem">a</div> 447 <div role="menuitem">a</div>
448 </div> 448 </div>
449 */}, 449 */},
450 function(root) { 450 function(root) {
451 var el = root.firstChild.firstChild; 451 var el = root.firstChild.firstChild;
452 var range = cursors.Range.fromNode(el); 452 var range = cursors.Range.fromNode(el);
453 var o = new Output().withSpeechAndBraille(range, null, 'navigate'); 453 var o = new Output().withSpeechAndBraille(range, null, 'navigate');
454 assertEqualsJSON({string_: 'a|Menu item| 1 of 1 ||Menu', spans_: 454 checkSpeechOutput('a|Menu item| 1 of 1 ', [
455 [{value: {earconId: 'BUTTON'}, start : 0, end: 1}, 455 {value: 'name', start: 0, end: 1},
456 {value: 'name', start: 21, end: 21}, 456 {value: 'role', start: 2, end: 11}], o);
457 {value: {earconId: 'LISTBOX'}, start: 21, end: 21},
458 {value: 'role', start: 22, end: 26}]}, o.speechOutputForTest);
459 checkBrailleOutput( 457 checkBrailleOutput(
460 'a mnuitm 1/1 mnu', 458 'a mnuitm 1/1',
461 [{value: new Output.NodeSpan(el), start: 0, end: 12}, 459 [{value: new Output.NodeSpan(el), start: 0, end: 12}],
462 {value: new Output.NodeSpan(el.parent), start: 13, end: 16}],
463 o); 460 o);
464 }); 461 });
465 }); 462 });
466 463
467 TEST_F('OutputE2ETest', 'ListBox', function() { 464 TEST_F('OutputE2ETest', 'ListBox', function() {
468 this.runWithLoadedTree(function() {/*! 465 this.runWithLoadedTree(function() {/*!
469 <select multiple> 466 <select multiple>
470 <option>1</option> 467 <option>1</option>
471 <option>2</option> 468 <option>2</option>
472 </select> 469 </select>
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 this.runWithLoadedTree(function() {/*! 642 this.runWithLoadedTree(function() {/*!
646 <div><button>ok</button></div> 643 <div><button>ok</button></div>
647 */}, 644 */},
648 function(root) { 645 function(root) {
649 var div = root.find({role: 'div'}); 646 var div = root.find({role: 'div'});
650 var o = new Output().withSpeech(cursors.Range.fromNode(div)); 647 var o = new Output().withSpeech(cursors.Range.fromNode(div));
651 assertEquals('ok|Button' 648 assertEquals('ok|Button'
652 , o.speechOutputForTest.string_); 649 , o.speechOutputForTest.string_);
653 }); 650 });
654 }); 651 });
OLDNEW
« 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