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

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

Issue 2195343003: Support navigation within editable nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 4 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/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 0fbcb7d2183701b1c8999e245e09dd22300b1023..aafc9416274ec69a6d7f24caa1fcf4e2741db9a5 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -373,6 +373,7 @@ TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
// The selected node moves to the static text node.
assertEquals(secondLineCursor.node.parent,
secondLineCursor.selectionNode_);
+
// This selects the entire node via a character offset.
assertEquals(6, secondLineCursor.selectionIndex_);
@@ -380,14 +381,16 @@ TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
secondLineCursor = new cursors.Cursor(secondLine, 1);
assertEquals(7, secondLineCursor.selectionIndex_);
- // Now, try selecting via node offsets.
+ // Now, try selecting via node offsets. This defaults to index 0 and not
+ // index in parent because Blink accessibility selection doesn't always
+ // work.
var cursor = new cursors.Cursor(root.firstChild, -1);
- assertEquals(root, cursor.selectionNode_);
+ assertEquals(root.firstChild, cursor.selectionNode_);
assertEquals(0, cursor.selectionIndex_);
cursor = new cursors.Cursor(root.firstChild.nextSibling, -1);
- assertEquals(root, cursor.selectionNode_);
- assertEquals(1, cursor.selectionIndex_);
+ assertEquals(root.firstChild.nextSibling, cursor.selectionNode_);
+ assertEquals(0, cursor.selectionIndex_);
});
});

Powered by Google App Engine
This is Rietveld 408576698