| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 | 7 |
| 8 GEN_INCLUDE(['../../testing/mock_feedback.js']); | 8 GEN_INCLUDE(['../../testing/mock_feedback.js']); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 'Announce The Title Of The Current Page ChromeVox+A>W', | 78 'Announce The Title Of The Current Page ChromeVox+A>W', |
| 79 'Menu item', / 1 of [0-9]{2} /) | 79 'Menu item', / 1 of [0-9]{2} /) |
| 80 .replay(); | 80 .replay(); |
| 81 }); | 81 }); |
| 82 }); | 82 }); |
| 83 | 83 |
| 84 TEST_F('PanelTest', 'LinkMenu', function() { | 84 TEST_F('PanelTest', 'LinkMenu', function() { |
| 85 var mockFeedback = this.createMockFeedback(); | 85 var mockFeedback = this.createMockFeedback(); |
| 86 this.runWithLoadedTree(this.linksDoc, function(root) { | 86 this.runWithLoadedTree(this.linksDoc, function(root) { |
| 87 var openMenus = new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link'); | 87 var openMenus = new PanelCommand(PanelCommandType.OPEN_MENUS, 'role_link'); |
| 88 mockFeedback.expectSpeech('apple') | 88 mockFeedback.call(openMenus.send.bind(openMenus)) |
| 89 .call(openMenus.send.bind(openMenus)) | |
| 90 .expectSpeech('apple Link ', 'Menu item', ' 1 of 3 ', 'Link', 'Menu') | 89 .expectSpeech('apple Link ', 'Menu item', ' 1 of 3 ', 'Link', 'Menu') |
| 91 .call(this.fireMockEvent('ArrowLeft')) | 90 .call(this.fireMockEvent('ArrowLeft')) |
| 92 .expectSpeech('Landmark', 'Menu', 'No items. ', 'Menu item', ' 1 of 1 ') | 91 .expectSpeech('Landmark', 'Menu', 'No items. ', 'Menu item', ' 1 of 1 ') |
| 93 .call(this.fireMockEvent('ArrowRight')) | 92 .call(this.fireMockEvent('ArrowRight')) |
| 94 .expectSpeech('Link', 'Menu', 'apple Link ', 'Menu item', ' 1 of 3 ') | 93 .expectSpeech('Link', 'Menu', 'apple Link ', 'Menu item', ' 1 of 3 ') |
| 95 .call(this.fireMockEvent('ArrowUp')) | 94 .call(this.fireMockEvent('ArrowUp')) |
| 96 .expectSpeech( 'banana Link ', 'Menu item', ' 3 of 3 ') | 95 .expectSpeech( 'banana Link ', 'Menu item', ' 3 of 3 ') |
| 97 .call(this.fireMockEvent('Enter')) | 96 .call(this.fireMockEvent('Enter')) |
| 98 .expectSpeech( 'apple', 'Link', /data[\s\S]*window/) | 97 .expectSpeech('banana', 'Link', /data.*window/) |
| 99 .expectSpeech('banana', 'Link') | |
| 100 .replay(); | 98 .replay(); |
| 101 }); | 99 }); |
| 102 }); | 100 }); |
| OLD | NEW |