Fix display smoothness autotestPrivate api test flake (round 2)
It turns out the problem is not with the display smoothness test itself. It is introduced by my CL:2132683 that attempts to fix acceleratorTest. It wraps chrome.test.succeed() in a setInterval callback. On slow bots, chrome.test.succeed() could be called more than once. As a result, tests could be invoked prematurely before the previous one finishes. This causes the problem for startSmoothnessTrackingExplicitDisplay because only one tracking per display is allowed hence it could only run after the previous startSmoothnessTracking finishes. This CL changes to setTimeout instead of setInterval to avoid checking test end condition multiple times during getAppWindowList call. It also moves chrome.test.succeed() out of timeout callback to ensure it is only called once. Bug: 1098886, 1108515 Change-Id: I8c04dc4d66f54bb28e8f3d407941083e89796b6d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316410Reviewed-by:Jun Mukai <mukai@chromium.org> Commit-Queue: Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#791667}
Showing
Please register or sign in to comment