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

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

Issue 2487043002: Refine braille output (Closed)
Patch Set: Add additional test. Created 4 years, 1 month 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/background_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index 3388b7e0bb21fa3fcb81a7db47d487bc3b61140b..99c957d29f793cefb4102fae305e8458d32e1559 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -162,7 +162,7 @@ TEST_F('BackgroundTest', 'ForwardBackwardNavigation', function() {
.expectBraille('foxtraut h2');
mockFeedback.call(doCmd('nextLine'))
.expectSpeech('end', 'of test')
- .expectBraille('end of test');
+ .expectBraille('endof test');
mockFeedback.call(doCmd('jumpToTop'))
.expectSpeech('start')
@@ -1206,3 +1206,24 @@ TEST_F('BackgroundTest', 'NavigationMovesFocus', function() {
doCmd('nextEditText')();
});
});
+
+TEST_F('BackgroundTest', 'BrailleCaretNavigation', function() {
+ var mockFeedback = this.createMockFeedback();
+ this.runWithLoadedTree(function(root) {/*!
+ <p>This is a<em>test</em> of inline braille<br>with a second line</p>
+ */}, function(root) {
+ var text = 'This is a';
+ mockFeedback.call(doCmd('nextCharacter'))
+ .expectBraille(text, {startIndex: 1, endIndex: 2}) // h
+ .call(doCmd('nextCharacter'))
+ .expectBraille(text, {startIndex: 2, endIndex: 3}) // i
+ .call(doCmd('nextWord'))
+ .expectBraille(text, {startIndex: 5, endIndex: 7}) // is
+ .call(doCmd('previousWord'))
+ .expectBraille(text, {startIndex: 0, endIndex: 4}) // This
+ .call(doCmd('nextLine'))
+ // Ensure nothing is selected when the range covers the entire line.
+ .expectBraille('with a second line', {startIndex: -1, endIndex: -1})
+ .replay();
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698