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

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

Issue 2441033002: Reland: Further refine div output when a div receives focus (Closed)
Patch Set: Created 4 years, 2 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 }); 641 });
642 }); 642 });
643 643
644 TEST_F('OutputE2ETest', 'ComplexDiv', function() { 644 TEST_F('OutputE2ETest', 'ComplexDiv', function() {
645 this.runWithLoadedTree(function() {/*! 645 this.runWithLoadedTree(function() {/*!
646 <div><button>ok</button></div> 646 <div><button>ok</button></div>
647 */}, 647 */},
648 function(root) { 648 function(root) {
649 var div = root.find({role: 'div'}); 649 var div = root.find({role: 'div'});
650 var o = new Output().withSpeech(cursors.Range.fromNode(div)); 650 var o = new Output().withSpeech(cursors.Range.fromNode(div));
651 assertEquals('ok|Button' 651 assertEquals('ok', o.speechOutputForTest.string_);
652 , o.speechOutputForTest.string_);
653 }); 652 });
654 }); 653 });
655 654
656 TEST_F('OutputE2ETest', 'ContainerFocus', function() { 655 TEST_F('OutputE2ETest', 'ContainerFocus', function() {
657 this.runWithLoadedTree(function() {/*! 656 this.runWithLoadedTree(function() {/*!
658 <div role="row" tabindex=0 aria-label="start"></div> 657 <div role="row" tabindex=0 aria-label="start"></div>
659 <div role="row" tabindex=0 aria-label="end"></div> 658 <div role="row" tabindex=0 aria-label="end"></div>
660 */}, 659 */},
661 function(root) { 660 function(root) {
662 var r1 = cursors.Range.fromNode(root.firstChild); 661 var r1 = cursors.Range.fromNode(root.firstChild);
663 var r2 = cursors.Range.fromNode(root.lastChild); 662 var r2 = cursors.Range.fromNode(root.lastChild);
664 assertEquals('start|Row', 663 assertEquals('start|Row',
665 new Output().withSpeech(r1, r2).speechOutputForTest.string_); 664 new Output().withSpeech(r1, r2).speechOutputForTest.string_);
666 }); 665 });
667 }); 666 });
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