Modify tests in AccessibilityCacheTest.
This CL makes a couple modifications to allow tests to pass on devices
with different view hierarchies:
1) For tests that don't rely on the root of the window, the correct
subtree root is found using view id.
2) On other tests, all the nodes are put in a collection and the
existence of nodes are checked according to the purpose of the test.
This removes assumptions of the exact hierarchy and root node of the
view.
Bug: 266757300
Test: atest AccessibilityCacheTest
Change-Id: I7c9b430349e9c23c338a44e909809fbbc409000d
2 files changed