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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests Created 4 years, 8 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/renderer/resources/extensions/automation/automation_node.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index 85211225d443168893012700f72b7330f169241f..3c875816498f55874e92a6a531616c8913526b60 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -939,46 +939,57 @@ AutomationRootNodeImpl.prototype = {
},
};
-var AutomationNode = utils.expose('AutomationNode',
- AutomationNodeImpl,
- { functions: ['doDefault',
- 'find',
- 'findAll',
- 'focus',
- 'makeVisible',
- 'matches',
- 'setSelection',
- 'showContextMenu',
- 'addEventListener',
- 'removeEventListener',
- 'domQuerySelector',
- 'toString',
- 'boundsForRange'],
- readonly: publicAttributes.concat(
- ['parent',
- 'firstChild',
- 'lastChild',
- 'children',
- 'previousSibling',
- 'nextSibling',
- 'isRootNode',
- 'role',
- 'state',
- 'location',
- 'indexInParent',
- 'root']) });
-
-var AutomationRootNode = utils.expose('AutomationRootNode',
- AutomationRootNodeImpl,
- { superclass: AutomationNode,
- readonly: ['docTitle',
- 'docUrl',
- 'docLoaded',
- 'docLoadingProgress',
- 'anchorObject',
- 'anchorOffset',
- 'focusObject',
- 'focusOffset'] });
+function AutomationNode() {
+ privates(AutomationNode).constructPrivate(this, arguments);
+}
+utils.expose(AutomationNode, AutomationNodeImpl, {
+ functions: [
+ 'doDefault',
+ 'find',
+ 'findAll',
+ 'focus',
+ 'makeVisible',
+ 'matches',
+ 'setSelection',
+ 'showContextMenu',
+ 'addEventListener',
+ 'removeEventListener',
+ 'domQuerySelector',
+ 'toString',
+ 'boundsForRange',
+ ],
+ readonly: $Array.concat(publicAttributes, [
+ 'parent',
+ 'firstChild',
+ 'lastChild',
+ 'children',
+ 'previousSibling',
+ 'nextSibling',
+ 'isRootNode',
+ 'role',
+ 'state',
+ 'location',
+ 'indexInParent',
+ 'root',
+ ]),
+});
+
+function AutomationRootNode() {
+ privates(AutomationRootNode).constructPrivate(this, arguments);
+}
+utils.expose(AutomationRootNode, AutomationRootNodeImpl, {
+ superclass: AutomationNode,
+ readonly: [
+ 'docTitle',
+ 'docUrl',
+ 'docLoaded',
+ 'docLoadingProgress',
+ 'anchorObject',
+ 'anchorOffset',
+ 'focusObject',
+ 'focusOffset',
+ ],
+});
AutomationRootNode.get = function(treeID) {
return AutomationRootNodeImpl.get(treeID);

Powered by Google App Engine
This is Rietveld 408576698