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

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

Issue 1977853003: Only read out selected node in processing menuListItemSelected event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 this.runWithLoadedTree(this.iframesDoc, function(rootNode) { 623 this.runWithLoadedTree(this.iframesDoc, function(rootNode) {
624 chrome.automation.getDesktop(function(desktopNode) { 624 chrome.automation.getDesktop(function(desktopNode) {
625 runTestIfIframeIsLoaded(rootNode); 625 runTestIfIframeIsLoaded(rootNode);
626 626
627 desktopNode.addEventListener('loadComplete', function(evt) { 627 desktopNode.addEventListener('loadComplete', function(evt) {
628 runTestIfIframeIsLoaded(rootNode); 628 runTestIfIframeIsLoaded(rootNode);
629 }, true); 629 }, true);
630 }); 630 });
631 }); 631 });
632 }); 632 });
633
634 TEST_F('BackgroundTest', 'SelectOptionSelected', function() {
635 var mockFeedback = this.createMockFeedback();
636 this.runWithLoadedTree(function() {/*!
637 <select>
638 <option>apple
639 <option>banana
640 <option>grapefruit
641 </select>
642 */}, function(root) {
643 var select = root.find({role: 'popUpButton'});
644 var clickSelect = select.doDefault.bind(select);
645 var lastOption = select.lastChild.lastChild;
646 var selectLastOption = lastOption.doDefault.bind(lastOption);
647
648 mockFeedback.call(clickSelect)
649 .expectSpeech('apple')
650 .expectSpeech('Button')
651 .call(selectLastOption)
652 .expectNextSpeechUtteranceIsNot('apple')
653 .expectSpeech('grapefruit')
654 .replay();
655 });
656 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698