|
|
Created:
3 years, 7 months ago by elichtenberg Modified:
3 years, 7 months ago CC:
chromium-reviews, alemate+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdded unit tests for tree_walker and automation_predicate.
BUG=593885
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2866123002
Cr-Commit-Position: refs/heads/master@{#471879}
Committed: https://chromium.googlesource.com/chromium/src/+/3e4e1942c0b44ce8018f9936bfc1d0dbd3344171
Patch Set 1 #
Total comments: 2
Patch Set 2 : Responded to comment #
Total comments: 2
Patch Set 3 : Combined getSampleTree functions into one #
Messages
Total messages: 33 (22 generated)
Description was changed from ========== Added unit tests for tree_walker and automation_predicate. BUG=593885 ========== to ========== Added unit tests for tree_walker and automation_predicate. BUG=593885 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by elichtenberg@google.com to run a CQ dry run
elichtenberg@google.com changed reviewers: + dmazzoni@chromium.org, dtseng@chromium.org
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by elichtenberg@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2866123002/diff/1/chrome/browser/resources/ch... File chrome/browser/resources/chromeos/switch_access/tree_walker_unittest.gtestjs (right): https://codereview.chromium.org/2866123002/diff/1/chrome/browser/resources/ch... chrome/browser/resources/chromeos/switch_access/tree_walker_unittest.gtestjs:28: // upper1 Suggestion: write a general method to create the fake tree from a json object e.g. { role: 'webView', children: [ { role: 'staticText' }, ... ], ... then you don't need to duplicate the structure in a comment and do hand rolled connections of tree properties.
The CQ bit was checked by elichtenberg@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2866123002/diff/1/chrome/browser/resources/ch... File chrome/browser/resources/chromeos/switch_access/tree_walker_unittest.gtestjs (right): https://codereview.chromium.org/2866123002/diff/1/chrome/browser/resources/ch... chrome/browser/resources/chromeos/switch_access/tree_walker_unittest.gtestjs:28: // upper1 On 2017/05/09 16:49:21, David Tseng wrote: > Suggestion: write a general method to create the fake tree from a json object > e.g. > { > role: 'webView', > children: [ > { > role: 'staticText' > }, ... > ], ... > > then you don't need to duplicate the structure in a comment and do hand rolled > connections of tree properties. I tried this, but it wasn't very readable, and it would've taken additional code to get access to each of the nodes in the tree like we have now. Also, I usually set some of the properties of the nodes in the tests themselves rather than just in getSampleTree, so setting the properties through JSON isn't as helpful for that. Instead, I created a test support file with a "setChildren" function that is used to connect all of the nodes in the tree pretty concisely. The comment showing the structure of the tree was a lot more readable than just building the tree in JSON, so I figured I would keep that. The "setChildren" function ends up removing a lot of the code inside getSampleTree though, so I think this function is in a good place. What do you think?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...)
lgtm one more suggestion but otherwise looks good https://codereview.chromium.org/2866123002/diff/20001/chrome/browser/resource... File chrome/browser/resources/chromeos/switch_access/automation_predicate_unittest.gtestjs (right): https://codereview.chromium.org/2866123002/diff/20001/chrome/browser/resource... chrome/browser/resources/chromeos/switch_access/automation_predicate_unittest.gtestjs:95: getLessInterestingSampleTree: function() { This tree and the one above are basically the same except for a few nodes being interesting. Maybe just have each individual test make a few nodes focusable before asserting some things? that way you don't need two otherwise similar tree generators
https://codereview.chromium.org/2866123002/diff/20001/chrome/browser/resource... File chrome/browser/resources/chromeos/switch_access/automation_predicate_unittest.gtestjs (right): https://codereview.chromium.org/2866123002/diff/20001/chrome/browser/resource... chrome/browser/resources/chromeos/switch_access/automation_predicate_unittest.gtestjs:95: getLessInterestingSampleTree: function() { On 2017/05/10 05:57:03, dmazzoni wrote: > This tree and the one above are basically the same except for a few > nodes being interesting. > > Maybe just have each individual test make a few nodes focusable > before asserting some things? that way you don't need two otherwise > similar tree generators Done.
The CQ bit was checked by elichtenberg@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from dmazzoni@chromium.org Link to the patchset: https://codereview.chromium.org/2866123002/#ps40001 (title: "Combined getSampleTree functions into one")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_TIMED_OUT, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by elichtenberg@google.com
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by elichtenberg@google.com
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1494873487497300, "parent_rev": "c5f38c8b3f5d08d086d2f2a4f35b004a4748665c", "commit_rev": "3e4e1942c0b44ce8018f9936bfc1d0dbd3344171"}
Message was sent while issue was closed.
Description was changed from ========== Added unit tests for tree_walker and automation_predicate. BUG=593885 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Added unit tests for tree_walker and automation_predicate. BUG=593885 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2866123002 Cr-Commit-Position: refs/heads/master@{#471879} Committed: https://chromium.googlesource.com/chromium/src/+/3e4e1942c0b44ce8018f9936bfc1... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/3e4e1942c0b44ce8018f9936bfc1... |