| 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 |
| 11 /** | 11 /** |
| 12 * Test fixture for Background. | 12 * Test fixture for Background. |
| 13 * @constructor | 13 * @constructor |
| 14 * @extends {ChromeVoxNextE2ETest} | 14 * @extends {ChromeVoxNextE2ETest} |
| 15 */ | 15 */ |
| 16 function BackgroundTest() { | 16 function BackgroundTest() { |
| 17 ChromeVoxNextE2ETest.call(this); | 17 ChromeVoxNextE2ETest.call(this); |
| 18 } | 18 } |
| 19 | 19 |
| 20 BackgroundTest.prototype = { | 20 BackgroundTest.prototype = { |
| 21 __proto__: ChromeVoxNextE2ETest.prototype, | 21 __proto__: ChromeVoxNextE2ETest.prototype, |
| 22 | 22 |
| 23 /** @override */ | 23 /** @override */ |
| 24 setUp: function() { | 24 setUp: function() { |
| 25 ChromeVoxState.instance.toggleNext(true); |
| 25 window.RoleType = chrome.automation.RoleType; | 26 window.RoleType = chrome.automation.RoleType; |
| 26 window.doCmd = this.doCmd; | 27 window.doCmd = this.doCmd; |
| 27 | 28 |
| 28 // Reset notifications so only explicit mode changes can cause them to trigg
er. | 29 // Reset notifications so only explicit mode changes can cause them to trigg
er. |
| 29 Notifications.reset(); | 30 Notifications.reset(); |
| 30 this.forceContextualLastOutput(); | 31 this.forceContextualLastOutput(); |
| 31 }, | 32 }, |
| 32 | 33 |
| 33 /** | 34 /** |
| 34 * @return {!MockFeedback} | 35 * @return {!MockFeedback} |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 <input type="text"></input> | 1170 <input type="text"></input> |
| 1170 */}, function(root) { | 1171 */}, function(root) { |
| 1171 this.listenOnce(root, 'focus', function(e) { | 1172 this.listenOnce(root, 'focus', function(e) { |
| 1172 var focus = ChromeVoxState.instance.currentRange.start.node; | 1173 var focus = ChromeVoxState.instance.currentRange.start.node; |
| 1173 assertEquals(RoleType.textField, focus.role); | 1174 assertEquals(RoleType.textField, focus.role); |
| 1174 assertTrue(focus.state.focused); | 1175 assertTrue(focus.state.focused); |
| 1175 }); | 1176 }); |
| 1176 doCmd('nextEditText')(); | 1177 doCmd('nextEditText')(); |
| 1177 }); | 1178 }); |
| 1178 }); | 1179 }); |
| OLD | NEW |