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

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

Issue 2957653002: Provide feedback for multi-line selections (Closed)
Patch Set: Add a test. 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
« 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 7be43bcde21e079efbd40914ce79e0811f62149e..9433676e61f101700ef7c7ec38ab4b75b5693aad 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs
@@ -407,6 +407,40 @@ TEST_F('EditingTest', 'RichTextMoveByCharacterEndOfLine', function() {
});
});
+TEST_F('EditingTest', 'RichTextExtendByCharacter', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function() {/*!
+ <div id="go" role="textbox" contenteditable>Te<br>st</div>
+
+ <script>
+ document.getElementById('go').addEventListener('click', function() {
+ var sel = getSelection();
+ sel.modify('extend', 'forward', 'character');
+ }, true);
+ </script>
+ */}, function(root) {
+ var input = root.find({role: RoleType.TEXT_FIELD});
+ var moveByChar = input.doDefault.bind(input);
+
+ this.listenOnce(input, 'focus', function() {
+ mockFeedback.call(moveByChar)
+ .expectSpeech('T', 'selected')
+ .call(moveByChar)
+ .expectSpeech('e', 'added to selection')
+ .call(moveByChar)
+ .expectSpeech('selected')
+ .call(moveByChar)
+ // This gets described by the line logic in EditableLine.
+ .expectSpeech('s', 'selected')
+ .call(moveByChar)
+ .expectSpeech('t', 'added to selection')
+
+ .replay();
+ });
+ input.focus();
+ });
+});
+
TEST_F('EditingTest', 'EditableLineOneStaticText', function() {
this.runWithLoadedTree(function() {/*!
<p contenteditable style="word-spacing:100000px">this is a test</p>
« 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