Commit e8851edd authored by Alexander Surkov's avatar Alexander Surkov Committed by Commit Bot

Port ax_dump_tree tool on mac: make ax_dump_tree tool get built on mac

Bug: 1124366
Change-Id: I79ba5caecabbdd825283d21f37b029bdc55d734f
AX-Relnotes: n/a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390898
Commit-Queue: Alexander Surkov <asurkov@igalia.com>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#804407}
parent b3a250fc
...@@ -616,6 +616,9 @@ group("gn_all") { ...@@ -616,6 +616,9 @@ group("gn_all") {
deps += [ deps += [
"//third_party/breakpad:crash_inspector", "//third_party/breakpad:crash_inspector",
"//third_party/breakpad:dump_syms", "//third_party/breakpad:dump_syms",
# The following are accessibility API tools.
"//tools/accessibility/inspect:ax_dump_tree",
] ]
deps -= [ deps -= [
# Mojo in GN contains some things which are never compiled in GYP on Mac, # Mojo in GN contains some things which are never compiled in GYP on Mac,
......
...@@ -14,16 +14,26 @@ Press Ctrl+C to quit. ...@@ -14,16 +14,26 @@ Press Ctrl+C to quit.
## ax_dump_tree ## ax_dump_tree
This tool helps monitor accessibility events. It currently works on Windows, This tool helps to inspect accessibility trees of applications. Trees are dumped into console.
and Mac is TBD.
Events are dumped to the console. To use it, run ### Build
`ax_dump_events --window=[hwnd]`
`autoninja -C out/Default ax_dump_tree`
### Run
To dump accessibility tree of application, run
`ax_dump_tree --window=id`
where `id` is HWND on Windows, PID on Linux and Mac.
Alternatively, you can indicate an application by its title:
`ax_dump_tree --pattern=title`
Notes: Notes:
* To use a hex window handle prefix it with `0x`. * To use a hex window handle prefix it with `0x`.
* For json output, use the `--json` option * For json output, use the `--json` option
* To filter certain properties, use `--filters=[path-to-filters.txt]` where the filters text file has a series of `@ALLOW` and/or `@DENY` lines. See example-tree-filters.txt in tools/accessibility/inspect. * To filter certain properties, use `--filters=[path-to-filters.txt]` where the filters text file has a series of `@ALLOW` and/or `@DENY` lines. See example-tree-filters.txt in tools/accessibility/inspect.
* [Mac] You have to turn on Accessibility for Terminal in Security & Privacy System Preferences.
## Convenience PowerShell scripts ## Convenience PowerShell scripts
......
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