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 669c605e6d2b2e752a3108ce65ca6168bbf45d56..7cc281a4b09dbd0123d52c60fd57aafca20704a0 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs |
@@ -70,7 +70,6 @@ |
range = range.move(move[0], move[1]); |
var expectedStart = move[2]; |
var expectedEnd = move[3]; |
- |
this.makeCursorAssertion(expectedStart, range.getStart()); |
this.makeCursorAssertion(expectedEnd, range.getEnd()); |
} |
@@ -94,25 +93,27 @@ |
* @param {string=} opt_testType Either CURSOR or RANGE. |
*/ |
runCursorMovesOnDocument: function(doc, moves, opt_testType) { |
- this.runWithLoadedTree(doc, |
- function(root) { |
- var start = null; |
- |
- // This occurs as a result of a load complete. |
- var start = AutomationUtil.findNodePost(root, |
- FORWARD, |
- AutomationPredicate.leaf); |
- |
- var cursor = new cursors.Cursor(start, 0); |
- if (!opt_testType || opt_testType == this.CURSOR) { |
+ this.runWithDocument(doc, |
+ function() { |
+ chrome.automation.getTree(function(root) { |
+ var start = null; |
+ |
+ // This occurs as a result of a load complete. |
+ var start = AutomationUtil.findNodePost(root, |
+ FORWARD, |
+ AutomationPredicate.leaf); |
+ |
var cursor = new cursors.Cursor(start, 0); |
- this.cursorMoveAndAssert(cursor, moves); |
- testDone(); |
- } else if (opt_testType == this.RANGE) { |
- var range = new cursors.Range(cursor, cursor); |
- this.rangeMoveAndAssert(range, moves); |
- testDone(); |
- } |
+ if (!opt_testType || opt_testType == this.CURSOR) { |
+ var cursor = new cursors.Cursor(start, 0); |
+ this.cursorMoveAndAssert(cursor, moves); |
+ testDone(); |
+ } else if (opt_testType == this.RANGE) { |
+ var range = new cursors.Range(cursor, cursor); |
+ this.rangeMoveAndAssert(range, moves); |
+ testDone(); |
+ } |
+ }.bind(this)); |
}.bind(this)); |
}, |