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

Unified Diff: tools/accessibility/dump_accessibility_tree_auralinux.py

Issue 1016743002: Adding helper function to check for correct application name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding helper Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/accessibility/dump_accessibility_tree_auralinux.py
diff --git a/tools/accessibility/dump_accessibility_tree_auralinux.py b/tools/accessibility/dump_accessibility_tree_auralinux.py
index 4c352d1c4832d05c599fad16c1baafca9c480a1e..6ec7fdc69c18b2988ea08b549368b5426b18e749 100755
--- a/tools/accessibility/dump_accessibility_tree_auralinux.py
+++ b/tools/accessibility/dump_accessibility_tree_auralinux.py
@@ -11,6 +11,14 @@ exposing its interface to ATK from the command line.
import pyatspi
+# Helper function to check application name
+def AppNameFinder(name):
+ if (name.lower().find('chromium') !=0 and
+ name.lower().find('chrome') !=0 and
+ name.lower().find('google chrome') != 0):
+ return False
+ return True
+
def Dump(obj, indent):
if not obj:
return
@@ -21,8 +29,7 @@ def Dump(obj, indent):
# Don't recurse into applications other than Chrome
if role == 'application':
- if (name.lower().find('chrom') != 0 and
- name.lower().find('google chrome') != 0):
+ if (not AppNameFinder(name)):
return
for i in range(obj.get_child_count()):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698