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

Issue 1155183006: Reimplement automation API on top of C++-backed AXTree. (Closed)

Created:
5 years, 6 months ago by dmazzoni
Modified:
5 years, 6 months ago
CC:
aboxhall+watch_chromium.org, arv+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, extensions-reviews_chromium.org, je_julie, kalyank, nektar+watch_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, plundblad+watch_chromium.org, sadrul, stevenjb+watch_chromium.org, yuzo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@automation_faster_2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reimplement automation API on top of C++-backed AXTree. Design doc: https://docs.google.com/a/google.com/document/d/1nKMfTbS5W6uGlqRHf0XRZLVzAcKD_vqu8lw7l9zHoBw/edit?usp=sharing BUG=495323 Committed: https://crrev.com/0e90449a7c9bd8f051fce4988a8cccd6c1c64661 Cr-Commit-Position: refs/heads/master@{#335183}

Patch Set 1 #

Patch Set 2 : Rebase, delete some code that shouldn't have been commented out #

Total comments: 61

Patch Set 3 : Rebase #

Total comments: 27

Patch Set 4 : Address most feedback #

Total comments: 2

Patch Set 5 : Fix some small bugs so that tests pass #

Patch Set 6 : Rebase #

Patch Set 7 : Fix one more test, address last feedback #

Patch Set 8 : Attribute names in list rather than a lot of function calls. #

Patch Set 9 : Fix accessibility_unittest #

Total comments: 29

Patch Set 10 : Rebase and address last feedback #

Patch Set 11 : Add support for input type html attribute #

Total comments: 19

Patch Set 12 : Avoid v8valueconverter and other feedback #

Total comments: 13

Patch Set 13 : Get rid of v8valueconverter #

Patch Set 14 : Made hostNode and axNodeDataCache private and added jsdoc #

Patch Set 15 : Copy observers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1433 lines, -2413 lines) Patch
M chrome/browser/extensions/api/automation/automation_apitest.cc View 1 2 3 4 5 4 chunks +5 lines, -332 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_event_router.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/automation_internal/automation_internal_api.cc View 1 2 3 7 chunks +31 lines, -9 lines 0 comments Download
D chrome/browser/extensions/api/automation_internal/automation_util.h View 1 chunk +0 lines, -41 lines 0 comments Download
D chrome/browser/extensions/api/automation_internal/automation_util.cc View 1 chunk +0 lines, -184 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/aura/accessibility/automation_manager_aura.cc View 1 2 3 chunks +10 lines, -15 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/automation.idl View 1 2 6 chunks +94 lines, -102 lines 0 comments Download
M chrome/common/extensions/api/automation_internal.idl View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -41 lines 0 comments Download
M chrome/renderer/extensions/automation_internal_custom_bindings.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +125 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/automation_internal_custom_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 9 chunks +486 lines, -26 lines 0 comments Download
M chrome/renderer/resources/extensions/automation/automation_node.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +450 lines, -639 lines 0 comments Download
M chrome/renderer/resources/extensions/automation_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +71 lines, -19 lines 0 comments Download
A + chrome/test/data/extensions/api_test/automation/sites/attributes.html View 1 2 3 chunks +15 lines, -14 lines 0 comments Download
D chrome/test/data/extensions/api_test/automation/sites/mixins.html View 1 chunk +0 lines, -72 lines 0 comments Download
A + chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js View 1 2 3 4 5 6 6 chunks +76 lines, -81 lines 0 comments Download
D chrome/test/data/extensions/api_test/automation/tests/tabs/mixins.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/automation/tests/tabs/mixins.js View 1 chunk +0 lines, -246 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js View 1 1 chunk +18 lines, -19 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/tree_change.js View 1 chunk +1 line, -1 line 0 comments Download
D chrome/test/data/extensions/api_test/automation/tests/unit/manifest.json View 1 chunk +0 lines, -8 lines 0 comments Download
D chrome/test/data/extensions/api_test/automation/tests/unit/test.js View 1 chunk +0 lines, -507 lines 0 comments Download
D chrome/test/data/extensions/api_test/automation/tests/unit/unit.html View 1 chunk +0 lines, -6 lines 0 comments Download
M extensions/renderer/logging_native_handler.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M extensions/renderer/logging_native_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -27 lines 0 comments Download
M extensions/renderer/script_context.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M extensions/renderer/script_context.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +30 lines, -0 lines 0 comments Download
M ui/accessibility/ax_tree.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M ui/accessibility/ax_tree_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 38 (8 generated)
dmazzoni
Ready for a first look!
5 years, 6 months ago (2015-06-04 23:01:29 UTC) #2
David Tseng
https://codereview.chromium.org/1155183006/diff/20001/chrome/browser/extensions/api/automation/automation_apitest.cc File chrome/browser/extensions/api/automation/automation_apitest.cc (right): https://codereview.chromium.org/1155183006/diff/20001/chrome/browser/extensions/api/automation/automation_apitest.cc#newcode283 chrome/browser/extensions/api/automation/automation_apitest.cc:283: int tree_id = AXTreeIDRegistry::GetInstance()->GetOrCreateAXTreeID( Is this code (and the ...
5 years, 6 months ago (2015-06-10 15:56:31 UTC) #4
David Tseng
https://codereview.chromium.org/1155183006/diff/20001/chrome/common/extensions/chrome_extension_messages.h File chrome/common/extensions/chrome_extension_messages.h (right): https://codereview.chromium.org/1155183006/diff/20001/chrome/common/extensions/chrome_extension_messages.h#newcode81 chrome/common/extensions/chrome_extension_messages.h:81: // ? https://codereview.chromium.org/1155183006/diff/20001/chrome/common/extensions/chrome_extension_messages.h#newcode82 chrome/common/extensions/chrome_extension_messages.h:82: IPC_MESSAGE_ROUTED1(ExtensionHostMsg_AutomationRequest, What kind of request? ...
5 years, 6 months ago (2015-06-10 17:48:17 UTC) #5
aboxhall
Initial thoughts; going to look at the rebased version now so some of these may ...
5 years, 6 months ago (2015-06-11 15:05:39 UTC) #6
aboxhall
https://codereview.chromium.org/1155183006/diff/40001/chrome/common/extensions/api/automation.idl File chrome/common/extensions/api/automation.idl (right): https://codereview.chromium.org/1155183006/diff/40001/chrome/common/extensions/api/automation.idl#newcode401 chrome/common/extensions/api/automation.idl:401: long scrollX; One thing we were trying to avoid ...
5 years, 6 months ago (2015-06-11 17:42:46 UTC) #7
dmazzoni
OK, I've addressed most feedback. Worth taking another look, but I'll hopefully finish addressing everything ...
5 years, 6 months ago (2015-06-11 19:09:12 UTC) #8
aboxhall
Generally looking good; will wait for the final version to stamp. https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): ...
5 years, 6 months ago (2015-06-11 20:32:42 UTC) #9
aboxhall
https://codereview.chromium.org/1155183006/diff/40001/chrome/common/extensions/api/automation.idl File chrome/common/extensions/api/automation.idl (right): https://codereview.chromium.org/1155183006/diff/40001/chrome/common/extensions/api/automation.idl#newcode401 chrome/common/extensions/api/automation.idl:401: long scrollX; On 2015/06/11 19:09:12, dmazzoni wrote: > On ...
5 years, 6 months ago (2015-06-11 22:22:34 UTC) #10
dmazzoni
I think all feedback is addressed now! https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode189 chrome/renderer/extensions/automation_internal_custom_bindings.cc:189: if (args.Length() ...
5 years, 6 months ago (2015-06-12 17:51:36 UTC) #11
dmazzoni
https://codereview.chromium.org/1155183006/diff/40001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/1155183006/diff/40001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode396 chrome/renderer/resources/extensions/automation/automation_node.js:396: defineStringAttribute('accessKey'); On 2015/06/11 20:32:42, aboxhall wrote: > On 2015/06/11 ...
5 years, 6 months ago (2015-06-12 17:55:37 UTC) #12
dmazzoni
https://codereview.chromium.org/1155183006/diff/40001/chrome/renderer/resources/extensions/automation/automation_node.js File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/1155183006/diff/40001/chrome/renderer/resources/extensions/automation/automation_node.js#newcode396 chrome/renderer/resources/extensions/automation/automation_node.js:396: defineStringAttribute('accessKey'); On 2015/06/12 17:55:37, dmazzoni wrote: > On 2015/06/11 ...
5 years, 6 months ago (2015-06-12 18:08:00 UTC) #13
aboxhall
LGTM with one open question (CHECK vs exception). Happy to go with whatever you decide ...
5 years, 6 months ago (2015-06-12 20:43:10 UTC) #14
David Tseng
https://codereview.chromium.org/1155183006/diff/160001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/160001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode189 chrome/renderer/extensions/automation_internal_custom_bindings.cc:189: void AutomationInternalCustomBindings::DestroyAccessibilityTree( nit: can combine with above https://codereview.chromium.org/1155183006/diff/160001/chrome/renderer/resources/extensions/automation/automation_node.js File ...
5 years, 6 months ago (2015-06-15 21:02:11 UTC) #15
David Tseng
lgtm
5 years, 6 months ago (2015-06-15 21:02:32 UTC) #16
dcheng
Mostly a bunch of minor nits. https://codereview.chromium.org/1155183006/diff/160001/chrome/browser/extensions/api/automation_internal/automation_event_router.cc File chrome/browser/extensions/api/automation_internal/automation_event_router.cc (right): https://codereview.chromium.org/1155183006/diff/160001/chrome/browser/extensions/api/automation_internal/automation_event_router.cc#newcode65 chrome/browser/extensions/api/automation_internal/automation_event_router.cc:65: CHECK(rph); What's the ...
5 years, 6 months ago (2015-06-15 21:36:56 UTC) #17
dmazzoni
https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode189 chrome/renderer/extensions/automation_internal_custom_bindings.cc:189: if (args.Length() != 1) On 2015/06/12 20:43:10, aboxhall wrote: ...
5 years, 6 months ago (2015-06-16 18:19:49 UTC) #18
aboxhall
lgtm https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/20001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode189 chrome/renderer/extensions/automation_internal_custom_bindings.cc:189: if (args.Length() != 1) On 2015/06/16 18:19:48, dmazzoni ...
5 years, 6 months ago (2015-06-16 18:22:44 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155183006/200001
5 years, 6 months ago (2015-06-16 22:01:01 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/71397)
5 years, 6 months ago (2015-06-16 22:13:06 UTC) #24
dmazzoni
+kalman for: chrome/renderer/extensions/automation_internal_custom_bindings.cc chrome/renderer/extensions/automation_internal_custom_bindings.h chrome/renderer/resources/extensions/automation_custom_bindings.js
5 years, 6 months ago (2015-06-16 22:17:26 UTC) #26
not at google - send to devlin
https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode139 chrome/renderer/extensions/automation_internal_custom_bindings.cc:139: const IPC::Message& message) { 1. There doesn't seem much ...
5 years, 6 months ago (2015-06-17 21:14:48 UTC) #27
dcheng
https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode446 chrome/renderer/extensions/automation_internal_custom_bindings.cc:446: for (size_t i = 0; i < (size_t)stack_trace->GetFrameCount(); ++i) ...
5 years, 6 months ago (2015-06-17 22:55:09 UTC) #28
dmazzoni
https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode139 chrome/renderer/extensions/automation_internal_custom_bindings.cc:139: const IPC::Message& message) { On 2015/06/17 21:14:48, kalman wrote: ...
5 years, 6 months ago (2015-06-18 07:23:54 UTC) #29
not at google - send to devlin
Sorry about the second round of non-trivial reviews. The V8ValueBuilder stuff is more a wish ...
5 years, 6 months ago (2015-06-18 17:34:38 UTC) #30
dmazzoni
https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/resources/extensions/automation_custom_bindings.js File chrome/renderer/resources/extensions/automation_custom_bindings.js (right): https://codereview.chromium.org/1155183006/diff/200001/chrome/renderer/resources/extensions/automation_custom_bindings.js#newcode152 chrome/renderer/resources/extensions/automation_custom_bindings.js:152: privates(root).impl.hostNode = node; On 2015/06/18 17:34:38, kalman wrote: > ...
5 years, 6 months ago (2015-06-18 21:31:53 UTC) #31
not at google - send to devlin
lgtm
5 years, 6 months ago (2015-06-18 22:52:16 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155183006/280001
5 years, 6 months ago (2015-06-18 23:39:32 UTC) #35
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 6 months ago (2015-06-19 00:55:03 UTC) #36
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/0e90449a7c9bd8f051fce4988a8cccd6c1c64661 Cr-Commit-Position: refs/heads/master@{#335183}
5 years, 6 months ago (2015-06-19 00:56:02 UTC) #37
dmazzoni
5 years, 6 months ago (2015-06-19 20:59:25 UTC) #38
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:280001) has been created in
https://codereview.chromium.org/1198613002/ by dmazzoni@chromium.org.

The reason for reverting is: Reverting as likely cause of bug 502311
.

Powered by Google App Engine
This is Rietveld 408576698