| 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 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 <script> | 102 <script> |
| 103 document.getElementById('go').addEventListener('click', function() { | 103 document.getElementById('go').addEventListener('click', function() { |
| 104 document.getElementById('c').textContent = 'Charlie'; | 104 document.getElementById('c').textContent = 'Charlie'; |
| 105 document.getElementById('a').textContent = 'Alpha'; | 105 document.getElementById('a').textContent = 'Alpha'; |
| 106 }, false); | 106 }, false); |
| 107 </script> | 107 </script> |
| 108 */}, | 108 */}, |
| 109 function(rootNode) { | 109 function(rootNode) { |
| 110 var go = rootNode.find({ role: RoleType.button }); | 110 var go = rootNode.find({ role: RoleType.button }); |
| 111 mockFeedback.call(go.doDefault.bind(go)) | 111 mockFeedback.call(go.doDefault.bind(go)) |
| 112 .expectCategoryFlushSpeech('Alpha') | 112 .expectCategoryFlushSpeech('Alpha Bravo Charlie') |
| 113 .expectQueuedSpeech('Bravo') | |
| 114 .expectQueuedSpeech('Charlie'); | |
| 115 mockFeedback.replay(); | 113 mockFeedback.replay(); |
| 116 }); | 114 }); |
| 117 }); | 115 }); |
| 118 | 116 |
| 119 TEST_F('LiveRegionsTest', 'LiveRegionChangeImageAlt', function() { | 117 TEST_F('LiveRegionsTest', 'LiveRegionChangeImageAlt', function() { |
| 120 // Note that there is a live region outputted as a result of page load; the | 118 // Note that there is a live region outputted as a result of page load; the |
| 121 // test expects a live region announcement after a click on the button, but | 119 // test expects a live region announcement after a click on the button, but |
| 122 // the LiveRegions module has a half second filter for live region | 120 // the LiveRegions module has a half second filter for live region |
| 123 // announcements on the same node. Set that timeout to 0 to prevent | 121 // announcements on the same node. Set that timeout to 0 to prevent |
| 124 // flakeyness. | 122 // flakeyness. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 var focusAfterNodeChange = window.setTimeout.bind(window, function() { | 243 var focusAfterNodeChange = window.setTimeout.bind(window, function() { |
| 246 root.firstChild.nextSibling.focus(); | 244 root.firstChild.nextSibling.focus(); |
| 247 }, 1000); | 245 }, 1000); |
| 248 mockFeedback.call(focusAfterNodeChange) | 246 mockFeedback.call(focusAfterNodeChange) |
| 249 .expectSpeech('hello!') | 247 .expectSpeech('hello!') |
| 250 .expectNextSpeechUtteranceIsNot('hello!') | 248 .expectNextSpeechUtteranceIsNot('hello!') |
| 251 .expectNextSpeechUtteranceIsNot('hello!') ; | 249 .expectNextSpeechUtteranceIsNot('hello!') ; |
| 252 mockFeedback.replay(); | 250 mockFeedback.replay(); |
| 253 }); | 251 }); |
| 254 }); | 252 }); |
| OLD | NEW |