| 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 // Include test fixture. | 5 // Include test fixture. |
| 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js', | 6 GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js', |
| 7 '../../testing/assert_additions.js']); | 7 '../../testing/assert_additions.js']); |
| 8 | 8 |
| 9 GEN_INCLUDE(['../../testing/mock_feedback.js']); | 9 GEN_INCLUDE(['../../testing/mock_feedback.js']); |
| 10 | 10 |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 assertEquals('classic', bk.mode); | 555 assertEquals('classic', bk.mode); |
| 556 | 556 |
| 557 // Now, verify mode switching uses the top level root. | 557 // Now, verify mode switching uses the top level root. |
| 558 fakeWebRoot.docUrl = 'http://google.com/#chromevox_next_test'; | 558 fakeWebRoot.docUrl = 'http://google.com/#chromevox_next_test'; |
| 559 fakeSubRoot.docUrl = 'http://chromevox.com'; | 559 fakeSubRoot.docUrl = 'http://chromevox.com'; |
| 560 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); | 560 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); |
| 561 assertEquals('next', bk.mode); | 561 assertEquals('next', bk.mode); |
| 562 | 562 |
| 563 // Next compat switching. | 563 // Next compat switching. |
| 564 localStorage['useNext'] = true; | 564 localStorage['useNext'] = true; |
| 565 fakeWebRoot.docUrl = 'http://docs.google.com/#123123'; | 565 fakeWebRoot.docUrl = 'http://docs.google.com/document/#123123'; |
| 566 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); | 566 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); |
| 567 assertEquals('next_compat', bk.mode); | 567 assertEquals('next_compat', bk.mode); |
| 568 | 568 |
| 569 // And, back to force next. | 569 // And, back to force next. |
| 570 fakeWebRoot.docUrl = 'http://google.com/'; | 570 fakeWebRoot.docUrl = 'http://docs.google.com/form/123'; |
| 571 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); | 571 bk.setCurrentRange(cursors.Range.fromNode(fakeWebRoot)); |
| 572 assertEquals('force_next', bk.mode); | 572 assertEquals('force_next', bk.mode); |
| 573 }.bind(this)); | 573 }.bind(this)); |
| 574 }); | 574 }); |
| 575 | 575 |
| 576 TEST_F('BackgroundTest', 'FocusIframe', function() { | 576 TEST_F('BackgroundTest', 'FocusIframe', function() { |
| 577 this.runWithLoadedTree( function() {/*! | 577 this.runWithLoadedTree( function() {/*! |
| 578 <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe> | 578 <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe> |
| 579 <button>outside</button> | 579 <button>outside</button> |
| 580 */}, function(root) { | 580 */}, function(root) { |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 <input type="text"></input> | 1169 <input type="text"></input> |
| 1170 */}, function(root) { | 1170 */}, function(root) { |
| 1171 this.listenOnce(root, 'focus', function(e) { | 1171 this.listenOnce(root, 'focus', function(e) { |
| 1172 var focus = ChromeVoxState.instance.currentRange.start.node; | 1172 var focus = ChromeVoxState.instance.currentRange.start.node; |
| 1173 assertEquals(RoleType.textField, focus.role); | 1173 assertEquals(RoleType.textField, focus.role); |
| 1174 assertTrue(focus.state.focused); | 1174 assertTrue(focus.state.focused); |
| 1175 }); | 1175 }); |
| 1176 doCmd('nextEditText')(); | 1176 doCmd('nextEditText')(); |
| 1177 }); | 1177 }); |
| 1178 }); | 1178 }); |
| OLD | NEW |