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

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

Issue 2948173004: Fix end of line announcements (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698