Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs

Issue 1716663002: Add a treeChange type to Automation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl set_commit Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 </script> 214 </script>
215 */}, 215 */},
216 function(rootNode) { 216 function(rootNode) {
217 var go = rootNode.find({ role: RoleType.button }); 217 var go = rootNode.find({ role: RoleType.button });
218 mockFeedback.call(go.doDefault.bind(go)) 218 mockFeedback.call(go.doDefault.bind(go))
219 .expectCategoryFlushSpeech('Live1') 219 .expectCategoryFlushSpeech('Live1')
220 .expectCategoryFlushSpeech('Live2'); 220 .expectCategoryFlushSpeech('Live2');
221 mockFeedback.replay(); 221 mockFeedback.replay();
222 }); 222 });
223 }); 223 });
224
225 TEST_F('LiveRegionsTest', 'SilentOnNodeChange', function() {
226 var mockFeedback = this.createMockFeedback();
227 this.runWithLoadedTree(function() {/*!
228 <p>start</p>
229 <button>first</button>
230 <div role="button" id="live" aria-live="polite">
231 hello!
232 </div>
233 <script>
234 var live = document.getElementById('live');
235 var pressed = true;
236 setInterval(function() {
237 live.setAttribute('aria-pressed', pressed);
238 pressed = !pressed;
239 }, 50);
240 </script>
241 */},
242 function(root) {
243 var focusAfterNodeChange = window.setTimeout.bind(window, function() {
244 root.firstChild.nextSibling.focus();
245 }, 1000);
246 mockFeedback.call(focusAfterNodeChange)
247 .expectSpeech('hello!')
248 .expectNextSpeechUtteranceIsNot('hello!')
249 .expectNextSpeechUtteranceIsNot('hello!') ;
250 mockFeedback.replay();
251 });
252 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698