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 ChromeVoxState.instance.toggleNext(true); |
26 window.RoleType = chrome.automation.RoleType; | 26 window.RoleType = chrome.automation.RoleType; |
27 window.doCmd = this.doCmd; | 27 window.doCmd = this.doCmd; |
| 28 |
| 29 // Reset notifications so only explicit mode changes can cause them to trigg
er. |
| 30 Notifications.reset(); |
28 }, | 31 }, |
29 | 32 |
30 /** | 33 /** |
31 * @return {!MockFeedback} | 34 * @return {!MockFeedback} |
32 */ | 35 */ |
33 createMockFeedback: function() { | 36 createMockFeedback: function() { |
34 var mockFeedback = new MockFeedback(this.newCallback(), | 37 var mockFeedback = new MockFeedback(this.newCallback(), |
35 this.newCallback.bind(this)); | 38 this.newCallback.bind(this)); |
36 mockFeedback.install(); | 39 mockFeedback.install(); |
37 return mockFeedback; | 40 return mockFeedback; |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 .call(assertRangeHasText('Top News')) | 960 .call(assertRangeHasText('Top News')) |
958 .call(doCmd('nextHeading')) | 961 .call(doCmd('nextHeading')) |
959 .expectSpeech('Most Popular') | 962 .expectSpeech('Most Popular') |
960 .call(assertRangeHasText('Most Popular')) | 963 .call(assertRangeHasText('Most Popular')) |
961 .call(doCmd('nextLine')) | 964 .call(doCmd('nextLine')) |
962 .expectSpeech('Sports') | 965 .expectSpeech('Sports') |
963 .call(assertRangeHasText('Sports')) | 966 .call(assertRangeHasText('Sports')) |
964 .replay(); | 967 .replay(); |
965 }); | 968 }); |
966 }); | 969 }); |
OLD | NEW |