OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 editing tests. | 12 * Test fixture for editing tests. |
13 * @constructor | 13 * @constructor |
14 * @extends {ChromeVoxNextE2ETest} | 14 * @extends {ChromeVoxNextE2ETest} |
15 */ | 15 */ |
16 function EditingTest() { | 16 function EditingTest() { |
17 ChromeVoxNextE2ETest.call(this); | 17 ChromeVoxNextE2ETest.call(this); |
18 window.RoleType = chrome.automation.RoleType; | 18 window.RoleType = chrome.automation.RoleType; |
19 } | 19 } |
20 | 20 |
21 EditingTest.prototype = { | 21 EditingTest.prototype = { |
22 __proto__: ChromeVoxNextE2ETest.prototype, | 22 __proto__: ChromeVoxNextE2ETest.prototype, |
23 | 23 |
| 24 /** @override */ |
| 25 setUp: function() { |
| 26 ChromeVoxState.instance.toggleNext(true); |
| 27 }, |
| 28 |
24 /** | 29 /** |
25 * @return {!MockFeedback} | 30 * @return {!MockFeedback} |
26 */ | 31 */ |
27 createMockFeedback: function() { | 32 createMockFeedback: function() { |
28 var mockFeedback = new MockFeedback(this.newCallback(), | 33 var mockFeedback = new MockFeedback(this.newCallback(), |
29 this.newCallback.bind(this)); | 34 this.newCallback.bind(this)); |
30 mockFeedback.install(); | 35 mockFeedback.install(); |
31 return mockFeedback; | 36 return mockFeedback; |
32 }, | 37 }, |
33 | 38 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 mockFeedback | 129 mockFeedback |
125 .expectSpeech('text1', 'Edit text') | 130 .expectSpeech('text1', 'Edit text') |
126 .expectBraille('text1 ed', {startIndex: 0, endIndex: 0}) | 131 .expectBraille('text1 ed', {startIndex: 0, endIndex: 0}) |
127 .call(input.setSelection.bind(input, 5, 5)) | 132 .call(input.setSelection.bind(input, 5, 5)) |
128 .expectBraille('text2 ed', {startIndex: 5, endIndex: 5}) | 133 .expectBraille('text2 ed', {startIndex: 5, endIndex: 5}) |
129 .expectSpeech('text2'); | 134 .expectSpeech('text2'); |
130 | 135 |
131 mockFeedback.replay(); | 136 mockFeedback.replay(); |
132 }); | 137 }); |
133 }); | 138 }); |
OLD | NEW |