Fix bug in serializing accessibility trees with invalidation.
In http://crrev.com/c/1152180, we introduced AXTreeSerializer::InvalidateSubtree. This replaced AXTreeSerializer::DeleteClientSubtree, which was problematic and led to subtle, hard-to-catch unserialization errors. This patch adds comprehensive tests for InvalidateSubtree by introducing it into the "generated tree" tests, which try every permutation of trees with up to a certain number of nodes and every possible change to those trees. Now those tests also try every possible way to invalidate a subtree before serializing. This uncovered one subtle bug: the code to detect reparenting also needed to check the 'invalid' flag and recursively check invalid children. Bug: 870661, 866293 Change-Id: I45313b712e50db4fba16a5d55f72ecd440f04335 Reviewed-on: https://chromium-review.googlesource.com/1180091Reviewed-by:David Tseng <dtseng@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#584643}
Showing
Please register or sign in to comment