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

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

Issue 2099833002: For a range surrounding a node, set selection index to 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add simple test. Created 4 years, 5 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/cursors.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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 */}, function(root) { 928 */}, function(root) {
929 mockFeedback.call(doCmd('nextHeading')) 929 mockFeedback.call(doCmd('nextHeading'))
930 .expectNextSpeechUtteranceIsNot('NE') 930 .expectNextSpeechUtteranceIsNot('NE')
931 .expectSpeech('NW') 931 .expectSpeech('NW')
932 .call(doCmd('previousHeading')) 932 .call(doCmd('previousHeading'))
933 .expectNextSpeechUtteranceIsNot('NE') 933 .expectNextSpeechUtteranceIsNot('NE')
934 .expectSpeech('NW') 934 .expectSpeech('NW')
935 .replay(); 935 .replay();
936 }); 936 });
937 }); 937 });
938
939 TEST_F('BackgroundTest', 'ContentEditableJumpSyncsRange', function() {
940 var mockFeedback = this.createMockFeedback();
941 this.runWithLoadedTree(function(root) {/*!
942 <div contenteditable>
943 <h1>Top News</h1>
944 <h1>Most Popular</h1>
945 <h1>Sports</h1>
946 </div>
947 */}, function(root) {
948 var assertRangeHasText = function(text) {
949 return function() {
950 assertEquals(text,
951 ChromeVoxState.instance.getCurrentRange().start.node.name);
952 };
953 };
954
955 mockFeedback.call(doCmd('nextHeading'))
956 .expectSpeech('Top News')
957 .call(assertRangeHasText('Top News'))
958 .call(doCmd('nextHeading'))
959 .expectSpeech('Most Popular')
960 .call(assertRangeHasText('Most Popular'))
961 .call(doCmd('nextLine'))
962 .expectSpeech('Sports')
963 .call(assertRangeHasText('Sports'))
964 .replay();
965 });
966 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698