OLD | NEW |
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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 this.runWithLoadedTree(function() {/*! | 643 this.runWithLoadedTree(function() {/*! |
644 <div><button>ok</button></div> | 644 <div><button>ok</button></div> |
645 */}, | 645 */}, |
646 function(root) { | 646 function(root) { |
647 var div = root.find({role: 'div'}); | 647 var div = root.find({role: 'div'}); |
648 var o = new Output().withSpeech(cursors.Range.fromNode(div)); | 648 var o = new Output().withSpeech(cursors.Range.fromNode(div)); |
649 assertEquals('ok|Button' | 649 assertEquals('ok|Button' |
650 , o.speechOutputForTest.string_); | 650 , o.speechOutputForTest.string_); |
651 }); | 651 }); |
652 }); | 652 }); |
| 653 |
| 654 TEST_F('OutputE2ETest', 'ContainerFocus', function() { |
| 655 this.runWithLoadedTree(function() {/*! |
| 656 <div role="row" tabindex=0 aria-label="start"></div> |
| 657 <div role="row" tabindex=0 aria-label="end"></div> |
| 658 */}, |
| 659 function(root) { |
| 660 var r1 = cursors.Range.fromNode(root.firstChild); |
| 661 var r2 = cursors.Range.fromNode(root.lastChild); |
| 662 assertEquals('start|Row', |
| 663 new Output().withSpeech(r1, r2).speechOutputForTest.string_); |
| 664 }); |
| 665 }); |
OLD | NEW |