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

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

Issue 880063002: Ensure WebView notifies desktop automation on creation, destruction, and change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leaks? Created 5 years, 11 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 7cc281a4b09dbd0123d52c60fd57aafca20704a0..d5b9fd39502496ee7d515c9fa1bc921ad4b44900 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -70,6 +70,7 @@ CursorsTest.prototype = {
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());
}
@@ -93,27 +94,25 @@ CursorsTest.prototype = {
* @param {string=} opt_testType Either CURSOR or RANGE.
*/
runCursorMovesOnDocument: function(doc, moves, opt_testType) {
- this.runWithDocument(doc,
- function() {
- chrome.automation.getTree(function(root) {
- var start = null;
+ this.runWithAutomation(doc,
+ function(root) {
+ var start = null;
- // This occurs as a result of a load complete.
- var start = AutomationUtil.findNodePost(root,
- FORWARD,
- AutomationPredicate.leaf);
+ // 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) {
var cursor = new cursors.Cursor(start, 0);
- 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));
+ 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));
},

Powered by Google App Engine
This is Rietveld 408576698