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

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

Issue 908853004: Revert of Reland #2: Ensure WebView notifies desktop automation on creation, destruction, and change Original (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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));
},

Powered by Google App Engine
This is Rietveld 408576698