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

Issue 2601333002: Update json_schema_compiler to handle the Automation extension API (Closed)

Created:
3 years, 11 months ago by dmazzoni
Modified:
3 years, 11 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, alemate+watch_chromium.org, oshima+watch_chromium.org, aboxhall+watch_chromium.org, jlklein+watch-closure_chromium.org, nektar+watch_chromium.org, yuzo+watch_chromium.org, je_julie, arv+watch_chromium.org, dtseng+watch_chromium.org, vitalyp+closure_chromium.org, chromium-apps-reviews_chromium.org, dbeam+watch-closure_chromium.org, dmazzoni+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update json_schema_compiler to handle the Automation extension API This allows the automation externs file to be fully autogenerated. Lots of tweaks to ChromeVox were required since we've been working with a hand-tweaked externs file for a while. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2601333002 Cr-Commit-Position: refs/heads/master@{#445146} Committed: https://chromium.googlesource.com/chromium/src/+/f1cbfff18b19ff99310ffbfb94ca75462da7a859

Patch Set 1 #

Patch Set 2 : Better solution #

Total comments: 6

Patch Set 3 : Added CustomAutomationEvent and renamed enums #

Patch Set 4 : Fix select_to_speak #

Total comments: 53

Patch Set 5 : Fix active_tab test #

Patch Set 6 : Address lots of feedback #

Total comments: 10

Patch Set 7 : Override stopPropagation #

Patch Set 8 : Optional to nullable #

Total comments: 15

Patch Set 9 : Fix nullable -> optional, etc. #

Patch Set 10 : Fix sanity check #

Patch Set 11 : Add wordStarts/wordEnds back to automation_node, they're actually used #

Patch Set 12 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1734 lines, -1040 lines) Patch
M chrome/browser/resources/chromeos/chromevox/BUILD.gn View 1 2 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/resources/chromeos/chromevox/common/chrome_extension_externs.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -8 lines 0 comments Download
D chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_object_constructor_installer.js View 1 2 1 chunk +0 lines, -37 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js View 1 2 3 4 5 6 7 8 18 chunks +89 lines, -88 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util.js View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_util_test.extjs View 1 2 3 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +21 lines, -18 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs View 1 2 19 chunks +27 lines, -27 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js View 1 2 3 4 5 6 7 8 9 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js View 1 2 3 4 5 6 7 8 11 chunks +22 lines, -22 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs View 1 2 3 chunks +8 lines, -8 lines 0 comments Download
A chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js View 1 2 3 4 5 6 1 chunk +33 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js View 1 2 3 4 5 16 chunks +73 lines, -59 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js View 1 2 3 4 5 6 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs View 1 2 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/find_handler.js View 2 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions.js View 2 4 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/live_regions_test.extjs View 1 2 7 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/media_automation_handler.js View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js View 1 2 3 4 5 13 chunks +38 lines, -33 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/tabs_automation_handler.js View 1 2 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker.js View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/chromeos/select_to_speak/select_to_speak.js View 1 2 3 4 5 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/common/extensions/api/automation.idl View 1 2 3 4 5 6 7 8 6 chunks +161 lines, -55 lines 0 comments Download
M chrome/renderer/extensions/automation_internal_custom_bindings.cc View 1 2 3 4 5 3 chunks +8 lines, -30 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 10 chunks +18 lines, -29 lines 0 comments Download
M chrome/renderer/resources/extensions/automation_custom_bindings.js View 1 2 6 chunks +7 lines, -18 lines 0 comments Download
M chrome/test/data/extensions/api_test/active_tab/background.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/actions.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/desktop.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/focus_views.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/load_tabs.js View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/generated/generated_trees.js View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/actions.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js View 1 2 3 4 5 1 chunk +9 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/bounds_for_range.js View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/document_selection.js View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/events.js View 1 2 4 chunks +16 lines, -16 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/find.js View 1 2 3 4 5 6 7 4 chunks +80 lines, -64 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/image_data.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/line_start_offsets.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/location.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/location2.js View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/sanity_check.js View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -5 lines 0 comments Download
M third_party/closure_compiler/externs/automation.js View 1 2 3 4 5 6 7 8 4 chunks +870 lines, -396 lines 0 comments Download
M tools/json_schema_compiler/idl_schema.py View 1 2 3 4 5 3 chunks +12 lines, -3 lines 0 comments Download
M tools/json_schema_compiler/idl_schema_test.py View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
M tools/json_schema_compiler/js_externs_generator.py View 1 2 3 4 5 6 7 8 8 chunks +41 lines, -8 lines 0 comments Download
M tools/json_schema_compiler/js_externs_generator_test.py View 1 2 3 4 5 6 7 8 2 chunks +49 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/js_util.py View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M ui/accessibility/PRESUBMIT.py View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 68 (40 generated)
dmazzoni
Work in progress. I realized after going down this path that js_externs_generator converts enums to ...
3 years, 11 months ago (2016-12-29 23:42:52 UTC) #3
Dan Beam
+rdevlin.cronin@ for tools/json_schema_compiler
3 years, 11 months ago (2016-12-30 03:28:23 UTC) #4
Dan Beam
3 years, 11 months ago (2016-12-30 03:30:42 UTC) #7
dmazzoni
Updated to add a flag to disable normalization of enums. Perhaps we could land the ...
3 years, 11 months ago (2016-12-30 18:09:52 UTC) #10
David Tseng
Took a very cursory glance and here are some initial thoughts: We're not allowed to ...
3 years, 11 months ago (2016-12-30 19:00:27 UTC) #13
dmazzoni
Thanks, that all makes sense. Making the constructor private and making the event listeners take ...
3 years, 11 months ago (2016-12-30 23:35:27 UTC) #14
Dan Beam
this seems super to me if it unblocks y'all we should definitely get Devlin's opinion ...
3 years, 11 months ago (2017-01-04 03:19:49 UTC) #15
Devlin
a few nits, but mostly good. If we can get more people using autogenerated enums, ...
3 years, 11 months ago (2017-01-04 23:54:21 UTC) #16
David Tseng
On 2016/12/30 23:35:27, dmazzoni wrote: > Thanks, that all makes sense. Making the constructor private ...
3 years, 11 months ago (2017-01-05 17:59:32 UTC) #17
David Tseng
On 2017/01/05 17:59:32, David Tseng wrote: > On 2016/12/30 23:35:27, dmazzoni wrote: > > Thanks, ...
3 years, 11 months ago (2017-01-05 18:08:44 UTC) #18
dmazzoni
Ready for another look! I changed all enums in ChromeVox to use the new style ...
3 years, 11 months ago (2017-01-10 22:19:11 UTC) #19
Dan Beam
overall awesome https://codereview.chromium.org/2601333002/diff/60001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js File chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js (right): https://codereview.chromium.org/2601333002/diff/60001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js#newcode19 chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js:19: * @param {string} eventFrom The source of ...
3 years, 11 months ago (2017-01-10 22:54:43 UTC) #24
David Tseng
Thanks for doing the renaming. Still a lot of discrepancies between the hand written and ...
3 years, 11 months ago (2017-01-10 23:24:33 UTC) #27
dmazzoni
Ready for another look. I made some more changes to json_schema_compiler to handle nullable types ...
3 years, 11 months ago (2017-01-11 22:20:43 UTC) #33
David Tseng
https://codereview.chromium.org/2601333002/diff/100001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js File chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js (right): https://codereview.chromium.org/2601333002/diff/100001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js#newcode26 chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js:26: }; Override stopPropagation and throw.
3 years, 11 months ago (2017-01-11 22:34:39 UTC) #35
dmazzoni
https://codereview.chromium.org/2601333002/diff/100001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js File chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js (right): https://codereview.chromium.org/2601333002/diff/100001/chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js#newcode26 chrome/browser/resources/chromeos/chromevox/cvox2/background/custom_automation_event.js:26: }; On 2017/01/11 22:34:39, David Tseng wrote: > Override ...
3 years, 11 months ago (2017-01-11 22:54:17 UTC) #36
Dan Beam
https://codereview.chromium.org/2601333002/diff/60001/chrome/test/data/extensions/api_test/automation/tests/tabs/find.js File chrome/test/data/extensions/api_test/automation/tests/tabs/find.js (right): https://codereview.chromium.org/2601333002/diff/60001/chrome/test/data/extensions/api_test/automation/tests/tabs/find.js#newcode55 chrome/test/data/extensions/api_test/automation/tests/tabs/find.js:55: assertEq(h1, rootNode.find({ role: RoleType.HEADING})); On 2017/01/11 22:20:42, dmazzoni wrote: ...
3 years, 11 months ago (2017-01-11 23:04:27 UTC) #39
dmazzoni
https://codereview.chromium.org/2601333002/diff/60001/chrome/test/data/extensions/api_test/automation/tests/tabs/find.js File chrome/test/data/extensions/api_test/automation/tests/tabs/find.js (right): https://codereview.chromium.org/2601333002/diff/60001/chrome/test/data/extensions/api_test/automation/tests/tabs/find.js#newcode55 chrome/test/data/extensions/api_test/automation/tests/tabs/find.js:55: assertEq(h1, rootNode.find({ role: RoleType.HEADING})); On 2017/01/11 23:04:26, Dan Beam ...
3 years, 11 months ago (2017-01-11 23:23:57 UTC) #41
Dan Beam
lgtm https://codereview.chromium.org/2601333002/diff/140001/tools/json_schema_compiler/idl_schema.py File tools/json_schema_compiler/idl_schema.py (right): https://codereview.chromium.org/2601333002/diff/140001/tools/json_schema_compiler/idl_schema.py#newcode62 tools/json_schema_compiler/idl_schema.py:62: match = re.search('<jsexterns>(.*)</jsexterns>', comment, re.DOTALL) oh, i guess ...
3 years, 11 months ago (2017-01-12 03:12:50 UTC) #45
Devlin
https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl File chrome/common/extensions/api/automation.idl (right): https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl#newcode380 chrome/common/extensions/api/automation.idl:380: // <jsexterns>@type {Object<chrome.automation.StateType, boolean>} This is kind of unfortunate... ...
3 years, 11 months ago (2017-01-12 17:28:48 UTC) #46
dmazzoni
https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl File chrome/common/extensions/api/automation.idl (right): https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl#newcode380 chrome/common/extensions/api/automation.idl:380: // <jsexterns>@type {Object<chrome.automation.StateType, boolean>} On 2017/01/12 17:28:47, Devlin wrote: ...
3 years, 11 months ago (2017-01-12 17:44:16 UTC) #47
Devlin
On 2017/01/12 17:44:16, dmazzoni wrote: > https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl > File chrome/common/extensions/api/automation.idl (right): > > https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl#newcode380 > ...
3 years, 11 months ago (2017-01-12 21:54:06 UTC) #48
dmazzoni
https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl File chrome/common/extensions/api/automation.idl (right): https://codereview.chromium.org/2601333002/diff/140001/chrome/common/extensions/api/automation.idl#newcode495 chrome/common/extensions/api/automation.idl:495: // <jsexterns>@type {Array<number>}</jsexterns> On 2017/01/12 17:28:47, Devlin wrote: > ...
3 years, 11 months ago (2017-01-13 21:22:54 UTC) #49
Devlin
it looks like there are still a few tests failing, but idl + compiler stuff ...
3 years, 11 months ago (2017-01-17 21:28:49 UTC) #56
dmazzoni
On 2017/01/17 21:28:49, Devlin (slow) wrote: > it looks like there are still a few ...
3 years, 11 months ago (2017-01-20 20:07:32 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2601333002/220001
3 years, 11 months ago (2017-01-20 20:08:06 UTC) #64
commit-bot: I haz the power
Committed patchset #12 (id:220001) as https://chromium.googlesource.com/chromium/src/+/f1cbfff18b19ff99310ffbfb94ca75462da7a859
3 years, 11 months ago (2017-01-20 20:15:47 UTC) #67
sebsg
3 years, 11 months ago (2017-01-23 14:55:47 UTC) #68
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:220001) has been created in
https://codereview.chromium.org/2650733002/ by sebsg@chromium.org.

The reason for reverting is: interactive_uitests failing for 50 times in a row

https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20C...

see crbug.com/683915.

Powered by Google App Engine
This is Rietveld 408576698