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

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

Issue 2445003002: Reland: Make ChromeVox Next the default ChromeVox experience (Closed)
Patch Set: speculative fixes 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
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 f494c175e6b812caf37e3ddb6f02972b16651eb1..f83ea09de9ab2f02aa72f60111276c69caff0cde 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -325,13 +325,14 @@ TEST_F('CursorsTest', 'IsInWebRange', function() {
TEST_F('CursorsTest', 'DISABLED_SingleDocSelection', function() {
this.runWithLoadedTree(function() {/*!
+ <span>start</span>
<p><a href="google.com">google home page</a></p>
<p>some more text</p>
<p>end of text</p>
*/},
function(root) {
- var link = root.firstChild.firstChild;
- var p1 = root.firstChild.nextSibling;
+ var link = root.find({role: RoleType.link});
+ var p1 = root.find({role: RoleType.paragraph});
var p2 = p1.nextSibling;
var singleSel = new cursors.Range(
@@ -350,7 +351,7 @@ TEST_F('CursorsTest', 'DISABLED_SingleDocSelection', function() {
assertEquals(1, root.focusOffset);
this.listenOnce(root, 'textSelectionChanged', verifySel);
multiSel.select();
- } else {
+ } else if (root.anchorObject == p1.firstChild) {
assertEquals(p1.firstChild, root.anchorObject);
assertEquals(2, root.anchorOffset);
assertEquals(p2.firstChild, root.focusObject);
@@ -394,9 +395,14 @@ TEST_F('CursorsTest', 'MultiLineOffsetSelection', function() {
TEST_F('CursorsTest', 'InlineElementOffset', function() {
this.runWithLoadedTree(function() {/*!
+ <span>start</span>
<p>This<br> is a<a href="#g">test</a>of selection</p>
*/}, function(root) {
root.addEventListener('textSelectionChanged', this.newCallback(function(evt) {
+ // Test setup moves initial focus; ensure we don't test that here.
+ if (testNode != root.anchorObject)
+ return;
+
// This is a little unexpected though not really incorrect; Ctrl+C works.
assertEquals(testNode, root.anchorObject);
assertEquals(ofSelectionNode, root.focusObject);

Powered by Google App Engine
This is Rietveld 408576698