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

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

Issue 2385343002: Make ChromeVox use child-index based offsets again for selection. (Closed)
Patch Set: Fix test Created 4 years, 2 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/cursors.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/cursors_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
index 1bcc45ea687c549b486dcf8849c5216a987e11ae..534079fb0947c80c080cb3bdfae27530d5467624 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -347,7 +347,7 @@ TEST_F('CursorsTest', 'SingleDocSelection', function() {
assertEquals(link.firstChild, root.anchorObject);
assertEquals(0, root.anchorOffset);
assertEquals(link.firstChild, root.focusObject);
- assertEquals(16, root.focusOffset);
+ assertEquals(1, root.focusOffset);
this.listenOnce(root, 'textSelectionChanged', verifySel);
multiSel.select();
} else {
@@ -381,16 +381,14 @@ TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
secondLineCursor = new cursors.Cursor(secondLine, 1);
assertEquals(7, secondLineCursor.selectionIndex_);
- // Now, try selecting via node offsets. This defaults to index 0 and not
- // index in parent because Blink accessibility selection doesn't always
- // work.
+ // Now, try selecting via node offsets.
var cursor = new cursors.Cursor(root.firstChild, -1);
- assertEquals(root.firstChild, cursor.selectionNode_);
+ assertEquals(root, cursor.selectionNode_);
assertEquals(0, cursor.selectionIndex_);
cursor = new cursors.Cursor(root.firstChild.nextSibling, -1);
- assertEquals(root.firstChild.nextSibling, cursor.selectionNode_);
- assertEquals(0, cursor.selectionIndex_);
+ assertEquals(root, cursor.selectionNode_);
+ assertEquals(1, cursor.selectionIndex_);
});
});
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698