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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js

Issue 2649373002: Re-land: Update json_schema_compiler to handle the Automation extension API (Closed)
Patch Set: Fix presubmit Created 3 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/automation_util.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js
index 83d0b6b3b7034ef007114f32df2fe9046c4aaa6a..77e323a14752985d737cac8886ee92d4ac9c179a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js
@@ -237,7 +237,7 @@ AutomationUtil.isInSameTree = function(a, b) {
// Given two non-desktop roots, consider them in the "same" tree.
return a.root === b.root ||
- (a.root.role == b.root.role && a.root.role == RoleType.rootWebArea);
+ (a.root.role == b.root.role && a.root.role == RoleType.ROOT_WEB_AREA);
};
/**
@@ -285,13 +285,13 @@ AutomationUtil.hitTest = function(node, point) {
*/
AutomationUtil.getTopLevelRoot = function(node) {
var root = node.root;
- if (!root || root.role == RoleType.desktop)
+ if (!root || root.role == RoleType.DESKTOP)
return null;
while (root &&
root.parent &&
root.parent.root &&
- root.parent.root.role != RoleType.desktop) {
+ root.parent.root.role != RoleType.DESKTOP) {
root = root.parent.root;
}
return root;
@@ -322,8 +322,8 @@ AutomationUtil.getText = function(node) {
if (!node)
return '';
- if (node.role === RoleType.textField)
- return node.value;
+ if (node.role === RoleType.TEXT_FIELD)
+ return node.value || '';
return node.name || '';
};

Powered by Google App Engine
This is Rietveld 408576698