|
|
DescriptionRemove attributes and methods which should not be part of the public API
BUG=309681
Committed: https://crrev.com/8b79607ff08e34877b2a8e46c4d72a21b4841951
Cr-Commit-Position: refs/heads/master@{#292835}
Patch Set 1 #Patch Set 2 : Ensure we're using the internal id rather than expecting the public getter to exist (it doesn't) #
Total comments: 6
Patch Set 3 : Review comments #Patch Set 4 : Rewrite unit test in terms of HTML IDs rather than automation IDs #
Messages
Total messages: 29 (7 generated)
aboxhall@chromium.org changed reviewers: + dmazzoni@chromium.org, dtseng@chromium.org
Did we want to keep toString as an undocumented API? On Thu, Aug 28, 2014 at 2:03 PM, <aboxhall@chromium.org> wrote: > Reviewers: David Tseng, dmazzoni, > > Description: > Remove attributes and methods which should not be part of the public API > > BUG=309681 > > Please review this at https://codereview.chromium.org/514363002/ > > SVN Base: https://chromium.googlesource.com/chromium/src@master > > Affected files (+2, -5 lines): > M chrome/renderer/resources/extensions/automation/automation_node.js > > > Index: chrome/renderer/resources/extensions/automation/automation_node.js > diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js > b/chrome/renderer/resources/extensions/automation/automation_node.js > index 7a1854a4ce78c23bb9d7df52e170908b8405e953.. > 14648ad1f09a7d0919c222d71b5f0cbe7d30a24b 100644 > --- a/chrome/renderer/resources/extensions/automation/automation_node.js > +++ b/chrome/renderer/resources/extensions/automation/automation_node.js > @@ -602,16 +602,13 @@ var AutomationNode = utils.expose('AutomationNode', > 'makeVisible', > 'setSelection', > 'addEventListener', > - 'removeEventListener', > - 'toString'], > + 'removeEventListener'], > readonly: ['isRootNode', > - 'id', > 'role', > 'state', > 'location', > 'attributes', > - 'root', > - 'toString'] }); > + 'root'] }); > > var AutomationRootNode = utils.expose('AutomationRootNode', > AutomationRootNodeImpl, > > > To unsubscribe from this group and stop receiving emails from it, send an > email to chromium-reviews+unsubscribe@chromium.org. > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2014/08/28 23:30:26, David Tseng wrote: > Did we want to keep toString as an undocumented API? My concern with toString is that it leaks implementation details (node IDs, really). I toyed with the idea of making a public version but then decided it wasn't enough of a win to be worth it. People can use JSON.stringify if they want to see what properties it has.
lgtm I don't have a strong opinion; it may be useful for debugging, but is easily accomplished by a client as you pointed out.
The CQ bit was checked by aboxhall@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/514363002/1
On 2014/08/29 16:48:25, David Tseng wrote: > lgtm > > I don't have a strong opinion; it may be useful for debugging, but is easily > accomplished by a client as you pointed out. Actually JSON.stringify won't work, but I still think we should remove this - as you say, someone could easily write their own stringifier trivially.
The CQ bit was unchecked by aboxhall@chromium.org
The CQ bit was checked by aboxhall@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/514363002/1
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...) win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
@dtseng PTAL: I had to make many more changes as a lot of things relied on .id being available on the wrapper object.
https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... File chrome/renderer/resources/extensions/automation/automation_node.js (left): https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:466: var parentId = 0; nit: We use 0 elsewhere as a valid id. Maybe -1? https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:468: var parentImpl = privates(childNode.parent()).impl; This should be in the if clause's body right? https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:469: if (childNode.parent()) parentId = parentImpl.id; if (...) ... (the one line if is pretty hard to read) and you'll need it for the previous comment.
lgtm With comments resolved.
https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... File chrome/renderer/resources/extensions/automation/automation_node.js (left): https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:466: var parentId = 0; On 2014/08/29 22:02:23, David Tseng wrote: > nit: We use 0 elsewhere as a valid id. Maybe -1? Done. https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... File chrome/renderer/resources/extensions/automation/automation_node.js (right): https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:468: var parentImpl = privates(childNode.parent()).impl; On 2014/08/29 22:02:23, David Tseng wrote: > This should be in the if clause's body right? Done. https://codereview.chromium.org/514363002/diff/20001/chrome/renderer/resource... chrome/renderer/resources/extensions/automation/automation_node.js:469: if (childNode.parent()) parentId = parentImpl.id; On 2014/08/29 22:02:23, David Tseng wrote: > if (...) > ... > > (the one line if is pretty hard to read) and you'll need it for the previous > comment. Done.
The CQ bit was checked by aboxhall@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/514363002/40001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_retina_tr...) linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...) win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...) win_chromium_x64_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by aboxhall@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aboxhall@chromium.org/514363002/60001
@dtseng: Heads-up that I needed to rewrite the "Unit" test in terms of HTML IDs rather than Automation IDs. Hopefully that's ok with you.
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 5cd1acab180becdc0d837d59190972ebd38957fa
Yeah, seems fine. Since it was a unit test context, you could have used privates to access the AutomationNodeImpl; not sure which would have been more work to fix the test. On Sun, Aug 31, 2014 at 9:30 PM, <aboxhall@chromium.org> wrote: > @dtseng: Heads-up that I needed to rewrite the "Unit" test in terms of > HTML IDs > rather than Automation IDs. Hopefully that's ok with you. > > > https://codereview.chromium.org/514363002/ > > To unsubscribe from this group and stop receiving emails from it, send an > email to chromium-reviews+unsubscribe@chromium.org. > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/8b79607ff08e34877b2a8e46c4d72a21b4841951 Cr-Commit-Position: refs/heads/master@{#292835} |