Update home launcher state waiter for tast tests
The waiter was not checking whether the home launcher visibility matches the expected state before starting the wait, and was relying on HomeLauncherAnimationComplete getting called (which only works for transitions initiated by user actions - e.g. drag gesture or pressing the home button). This changes the API implementation to work for wider set of cases - for example to wait for launcher transition to end after transition to tablet mode. The implementation now: 1. Verifies that app list state is as expected before checking home launcher visibility(e.g. during tablet mode transition the app list may animate from closed to fullscreen state) 2. Home launcher state waiter now returns early if the launcher already has the target visibility. 3. Waits for the visibility state to change - the waiter remains the same in the test API, but the state change callback now runs whenever the home launcher visibility changes to a final value. BUG=1147906, 1143980 Change-Id: I3728f12d81241ad84e0db95ea50779bd2598e1f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2530594 Commit-Queue: Toni Baržić <tbarzic@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#826665}
Showing
Please register or sign in to comment