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

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

Issue 2954413003: Support rich line output in both speech and braille (Closed)
Patch Set: Fix browser test Created 3 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
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 }, true); 239 }, true);
240 </script> 240 </script>
241 */}, function(root) { 241 */}, function(root) {
242 var input = root.find({role: RoleType.TEXT_FIELD}); 242 var input = root.find({role: RoleType.TEXT_FIELD});
243 var moveByLine = input.doDefault.bind(input); 243 var moveByLine = input.doDefault.bind(input);
244 this.listenOnce(input, 'focus', function() { 244 this.listenOnce(input, 'focus', function() {
245 mockFeedback.call(moveByLine) 245 mockFeedback.call(moveByLine)
246 .expectSpeech('\n') 246 .expectSpeech('\n')
247 .expectBraille('\n') 247 .expectBraille('\n')
248 .call(moveByLine) 248 .call(moveByLine)
249 .expectSpeech('This is a test of rich text') 249 .expectSpeech('This is a ', 'test', 'Link', ' of rich text')
250 .expectBraille('This is a test of rich text') 250 .expectBraille('This is a test of rich text')
251 .call(moveByLine) 251 .call(moveByLine)
252 .expectSpeech('\n') 252 .expectSpeech('\n')
253 .expectBraille('\n') 253 .expectBraille('\n')
254 .call(moveByLine) 254 .call(moveByLine)
255 .expectSpeech('hello') 255 .expectSpeech('hello', 'Heading 2')
256 .expectBraille('hello') 256 .expectBraille('hello')
257 .replay(); 257 .replay();
258 }); 258 });
259 input.focus(); 259 input.focus();
260 }); 260 });
261 }); 261 });
262 262
263 TEST_F('EditingTest', 'RichTextMoveByCharacter', function() { 263 TEST_F('EditingTest', 'RichTextMoveByCharacter', function() {
264 var mockFeedback = this.createMockFeedback(); 264 var mockFeedback = this.createMockFeedback();
265 this.runWithLoadedTree(function() {/*! 265 this.runWithLoadedTree(function() {/*!
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 assertEquals(0, e1.startOffset); 757 assertEquals(0, e1.startOffset);
758 assertEquals(2, e1.endOffset); 758 assertEquals(2, e1.endOffset);
759 759
760 // Across paragraph selection with base line on anchor. 760 // Across paragraph selection with base line on anchor.
761 e1 = new editing.EditableLine(thisIsATest, 5, hello, 2, true); 761 e1 = new editing.EditableLine(thisIsATest, 5, hello, 2, true);
762 assertEquals('is ', e1.text); 762 assertEquals('is ', e1.text);
763 assertEquals(0, e1.startOffset); 763 assertEquals(0, e1.startOffset);
764 assertEquals(3, e1.endOffset); 764 assertEquals(3, e1.endOffset);
765 }) 765 })
766 }); 766 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698