Fix "Process crashed" when WindowInputTests fail
On an ARC device, WindowInputTests gives "process crashed" error when
the assertion in the customized onTounchListener failed. When the
"process crashed" occurs, all remaining test cases fail, then rerun. The
obscuring windows of some test cases may also remain on the screen,
which interrupts remaining test cases. Caching the desired variables and
asserting them outside of the listener scope avoids the issue, and
failed test cases will not interrupt others, so that the test results
are more accurate.
Bug: 186695767
Test: run WindowInputTests, without 'Process crashed.' error.
Change-Id: I96810b771958f6c7a03efe507af9860bb12caa24
1 file changed