[DevicePage] Make KeyboardTest works well with actual setTimeout 0
Currently SetTimeout(..., 0) is clamped up to 1ms while which is not supposed to be in the spec. The Speedometer2 performance can boost ~1% on Windows without it based on Pinpoint perf. This CL is intended to fix the DevicePage test that become flaky with https://chromium-review.googlesource.com/c/chromium/src/+/2578703 Flaky test: OSSettingsDevicePageTest.KeyboardTest Fixing it by invoking additional 'flushTasks()' after 'MockInteractions.pressAndReleaseKeyOn' to make sure the 'onKeyUp_()' event in https://source.chromium.org/chromium/chromium/src/+/master:ui/webui/resources/cr_elements/cr_slider/cr_slider.js;l=319 be triggered in time. Bug: 402694 Change-Id: I2bb9c2a3a52861d2d2f3aaf0eff1a5267bc97671 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613715Reviewed-by:John Lee <johntlee@chromium.org> Commit-Queue: Wanming Lin <wanming.lin@intel.com> Cr-Commit-Position: refs/heads/master@{#841920}
Showing
Please register or sign in to comment