Commit 42d94642 authored by dtseng@chromium.org's avatar dtseng@chromium.org

Small cleanups in automation_node.js.

Review URL: https://codereview.chromium.org/346703002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281892 0039d316-1c4b-4281-b951-d872f2087c98
parent 7be2163f
......@@ -304,9 +304,6 @@
// TODO(aboxhall/dtseng): implement loading. Kept separate to not include
// in generated docs.
// TODO(dtseng/aboxhall): Implement non-trivial |load| function before going
// to dev.
// Whether this AutomationRootNode is loaded or not. If false, call load()
// to get the contents.
boolean loaded;
......
......@@ -78,15 +78,15 @@ AutomationNodeImpl.prototype = {
this.performAction_('doDefault');
},
focus: function(opt_callback) {
focus: function() {
this.performAction_('focus');
},
makeVisible: function(opt_callback) {
makeVisible: function() {
this.performAction_('makeVisible');
},
setSelection: function(startIndex, endIndex, opt_callback) {
setSelection: function(startIndex, endIndex) {
this.performAction_('setSelection',
{ startIndex: startIndex,
endIndex: endIndex });
......@@ -378,6 +378,14 @@ AutomationRootNodeImpl.prototype = {
delete this.axNodeDataCache_[id];
},
load: function(callback) {
// TODO(dtseng/aboxhall): Implement.
if (!this.loaded)
throw 'Unsupported state: root node is not loaded.';
setTimeout(callback, 0);
},
deleteOldChildren_: function(node, newChildIds) {
// Create a set of child ids in |src| for fast lookup, and return false
// if a duplicate is found;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment