Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs |
| index d743aa23c306e7b808f92a57e89e15fa14789e58..23bc7d1481088aa130ea00785c0f7820b7f04334 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs |
| @@ -373,6 +373,43 @@ TEST_F('EditingTest', 'RichTextMoveByCharacterNodeWorkaround', function() { |
| }); |
| }); |
| +TEST_F('EditingTest', 'RichTextMoveByCharacterEndOfLine', function() { |
| + editing.useRichText = true; |
| + var mockFeedback = this.createMockFeedback(); |
| + this.runWithLoadedTree(function() {/*! |
| + <div id="go" role="textbox" contenteditable>Test</div> |
| + |
| + <script> |
| + document.getElementById('go').addEventListener('click', function() { |
| + var sel = getSelection(); |
| + sel.modify('move', 'forward', 'character'); |
| + }, true); |
| + </script> |
| + */}, function(root) { |
| + var input = root.find({role: RoleType.TEXT_FIELD}); |
| + var moveByChar = input.doDefault.bind(input); |
| + var lineText = 'Test'; |
| + |
| + this.listenOnce(input, 'focus', function() { |
| + mockFeedback.call(moveByChar) |
| + .expectSpeech('e') |
| + .expectBraille(lineText, { startIndex: 1, endIndex: 1 }) |
| + .call(moveByChar) |
| + .expectSpeech('s') |
| + .expectBraille(lineText, { startIndex: 2, endIndex: 2 }) |
| + .call(moveByChar) |
| + .expectSpeech('t') |
| + .expectBraille(lineText, { startIndex: 3, endIndex: 3 }) |
| + .call(moveByChar) |
| + .expectSpeech('\n') |
|
dmazzoni
2017/06/23 18:31:45
Who translates this character into "end of line",
David Tseng
2017/06/23 19:17:07
We localize it (see abstract_tts.js).
|
| + .expectBraille(lineText, { startIndex: 4, endIndex: 4 }) |
| + |
| + .replay(); |
| + }); |
| + input.focus(); |
| + }); |
| +}); |
| + |
| TEST_F('EditingTest', 'EditableLineOneStaticText', function() { |
| this.runWithLoadedTree(function() {/*! |
| <p contenteditable style="word-spacing:100000px">this is a test</p> |