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

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

Issue 2955623002: Provide link start and end speech output (Closed)
Patch Set: Rebase. 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 7be43bcde21e079efbd40914ce79e0811f62149e..67b2aa301c336c2144fa43c51831f37ceda28cd3 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,49 @@ TEST_F('EditingTest', 'RichTextMoveByCharacterEndOfLine', function() {
});
});
+TEST_F('EditingTest', 'RichTextLinkOutput', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function() {/*!
+ <div id="go" role="textbox" contenteditable>a <a href="#">test</a></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 = 'a test';
+
+ this.listenOnce(input, 'focus', function() {
+ mockFeedback.call(moveByChar)
+ .expectSpeech(' ')
+ .expectBraille(lineText, { startIndex: 1, endIndex: 1 })
+ .call(moveByChar)
+ .expectSpeech('t')
+ .expectSpeech('Link start')
+ .expectSpeech('Underline start')
+ .expectBraille(lineText, { startIndex: 2, endIndex: 2 })
+ .call(moveByChar)
+ .expectSpeech('e')
+ .expectBraille(lineText, { startIndex: 3, endIndex: 3 })
+ .call(moveByChar)
+ .expectSpeech('s')
+ .expectBraille(lineText, { startIndex: 4, endIndex: 4 })
+ .call(moveByChar)
+ .expectSpeech('t')
+ .expectSpeech('Link end')
+ .expectSpeech('Underline end')
+ .expectBraille(lineText, { startIndex: 5, endIndex: 5 })
+
+ .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