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

Issue 304293002: Add human readable programmatic enum name/values to chrome.automation. (Closed)

Created:
6 years, 6 months ago by David Tseng
Modified:
6 years, 6 months ago
CC:
Peter Lundblad, chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Add human readable programmatic enum name/values to chrome.automation. This adds three new bindings to the automation API: chrome.automation.Event chrome.automation.Role chrome.automation.State Each is an object mapping an enum name to its value. Currently, this is an identity mapping. However, with the way the cl constructs the bindings, we could in the future substitute with integer values (and eliminate the stringification on either end of our extension/browser IPC). BUG=308003003 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273747

Patch Set 1 #

Patch Set 2 : Role and State. #

Patch Set 3 : <= #

Total comments: 15

Patch Set 4 : +1 #

Patch Set 5 : Address feedback #

Patch Set 6 : Add comments for header. #

Patch Set 7 : Suffix *Type sounds better? EventType, RoleType, StateType #

Patch Set 8 : Example usage #

Patch Set 9 : Migrate tabs tests. #

Patch Set 10 : Rebase #

Total comments: 4

Patch Set 11 : Last feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -35 lines) Patch
M chrome/renderer/extensions/automation_internal_custom_bindings.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/automation_internal_custom_bindings.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +43 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/automation_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/actions.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/common.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/desktop/desktop.js View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/actions.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/common.js View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/events.js View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -20 lines 0 comments Download
M chrome/test/data/extensions/api_test/automation/tests/tabs/location.js View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -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 3 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
David Tseng
Ready for an initial look mostly to validate the approach. I haven't gone through and ...
6 years, 6 months ago (2014-05-29 18:16:30 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode50 chrome/renderer/extensions/automation_internal_custom_bindings.cc:50: Local<Object> ret = Object::New(GetIsolate()); s/ret/additions/ ? https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode55 chrome/renderer/extensions/automation_internal_custom_bindings.cc:55: ++i) ...
6 years, 6 months ago (2014-05-29 18:26:20 UTC) #2
aboxhall
No substantial code-level comments. - Any chance of a trivial test to show how to ...
6 years, 6 months ago (2014-05-29 18:35:48 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js File chrome/renderer/resources/extensions/automation_custom_bindings.js (right): https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js#newcode121 chrome/renderer/resources/extensions/automation_custom_bindings.js:121: exports.binding.State = schema.State; On 2014/05/29 18:35:49, aboxhall wrote: > ...
6 years, 6 months ago (2014-05-29 18:45:49 UTC) #4
David Tseng
https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/extensions/automation_internal_custom_bindings.cc File chrome/renderer/extensions/automation_internal_custom_bindings.cc (right): https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/extensions/automation_internal_custom_bindings.cc#newcode50 chrome/renderer/extensions/automation_internal_custom_bindings.cc:50: Local<Object> ret = Object::New(GetIsolate()); On 2014/05/29 18:26:21, kalman wrote: ...
6 years, 6 months ago (2014-05-29 19:04:40 UTC) #5
David Tseng
On 2014/05/29 18:35:48, aboxhall wrote: > No substantial code-level comments. > > - Any chance ...
6 years, 6 months ago (2014-05-29 19:13:21 UTC) #6
not at google - send to devlin
lgtm https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js File chrome/renderer/resources/extensions/automation_custom_bindings.js (right): https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js#newcode121 chrome/renderer/resources/extensions/automation_custom_bindings.js:121: exports.binding.State = schema.State; On 2014/05/29 19:04:40, David Tseng ...
6 years, 6 months ago (2014-05-29 19:48:13 UTC) #7
aboxhall
On 2014/05/29 19:48:13, kalman wrote: > lgtm > > https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js > File chrome/renderer/resources/extensions/automation_custom_bindings.js (right): > ...
6 years, 6 months ago (2014-05-29 21:12:30 UTC) #8
aboxhall
lgtm
6 years, 6 months ago (2014-05-29 21:14:22 UTC) #9
David Tseng
https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js File chrome/renderer/resources/extensions/automation_custom_bindings.js (right): https://codereview.chromium.org/304293002/diff/20002/chrome/renderer/resources/extensions/automation_custom_bindings.js#newcode121 chrome/renderer/resources/extensions/automation_custom_bindings.js:121: exports.binding.State = schema.State; On 2014/05/29 19:48:14, kalman wrote: > ...
6 years, 6 months ago (2014-05-29 22:12:25 UTC) #10
David Tseng
The CQ bit was checked by dtseng@chromium.org
6 years, 6 months ago (2014-05-29 22:12:37 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dtseng@chromium.org/304293002/170001
6 years, 6 months ago (2014-05-29 22:16:16 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-05-30 02:01:56 UTC) #13
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 07:10:52 UTC) #14
Message was sent while issue was closed.
Change committed as 273747

Powered by Google App Engine
This is Rietveld 408576698