[Android Autofill] Fix buggy test of autofill triggering on reload
The test was expecting events in the wrong order: upon reload and click on the form it was expecting to see a CANCEL event followed by a VIEW_EXITED event, but the latter event is fired first as part of focus moving off of the current form, followed by the former event as part of starting the new autofill session. I did not detect this problem in my local testing because the CANCEL event is not sent (/listened for by the testing infrastructure) on Android versions > O. I verified locally that the test fails on an O emulator before the change in this CL and succeeds after the change. One thing that's not clear is how this test ever succeeded on the O trybot, e.g. on this run: https://ci.chromium.org/p/chromium/builders/ci/Android%20WebView%20O%20%28dbg%29/12151 This CL also changes the test to do the reload via AwActivityTestRule#reloadSync() rather than AwActivityTestRule#loadUrlSync() to reflect production behavior. That change, however, does not impact the above logic. Bug: 1142486 Change-Id: Id2e9d6dbb44615356b43603afb11a2b4de40467e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2502043Reviewed-by:Michael Bai <michaelbai@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#822074}
Showing
Please register or sign in to comment