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

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

Issue 2540553002: Implement rich editable line output (Closed)
Patch Set: Fix plain text line braille. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2b1293f01d1546f2a67d8c976d4c51fd0d08e266..c1ecc2b8392d7d1fc2bbaac7fcd283a5d607b736 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs
@@ -211,3 +211,49 @@ TEST_F('EditingTest', 'SingleCharacterLine', function() {
{start: 9, end: 17, text: 'can test'},
]);
});
+
+TEST_F('EditingTest', 'RichTextMoveByLine', function() {
+ editing.useRichText = true;
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function() {/*!
+ <div id="go" role="textbox" contenteditable>
+ <h2>hello</h2>
+ <div><br></div>
+ <p>This is a <a href="#test">test</a> of rich text</p>
+ </div>
+ <script>
+ var dir = 'forward';
+ var line = 0;
+ document.getElementById('go').addEventListener('click', function() {
+ var sel = getSelection();
+ sel.modify('move', dir, 'line');
+ if (dir == 'forward')
+ line++;
+ else
+ line--;
+
+ if (line == 0)
+ dir = 'forward';
+ if (line == 2)
+ dir = 'backward';
+ }, true);
+ </script>
+ */}, function(root) {
+ var input = root.find({role: RoleType.TEXT_FIELD});
+ var moveByLine = input.doDefault.bind(input);
+ mockFeedback.call(input.focus.bind(input))
+ .call(moveByLine)
+ .expectSpeech('blank')
+ .expectBraille('')
+ .call(moveByLine)
+ .expectSpeech('This is a ', 'test', 'Link', ' of rich text')
+ .expectBraille('This is a test lnk of rich text')
+ .call(moveByLine)
+ .expectSpeech('blank')
+ .expectBraille('')
+ .call(moveByLine)
+ .expectSpeech('hello', 'Heading 2')
+ .expectBraille('hello h2')
+ .replay();
+ });
+});
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698