Fix flaky test focus-without-user-activation-tentative.sub.html
Previously the test gives 400 ms timeout to wait for |onfocus| event to happen, while sometimes 400 ms is simply not enough, which result in flakiness. The solution is to remove this timeout restriction if we are expecting an onfocus event to happen. Note: According to html spec: https://html.spec.whatwg.org/#attr-fe-autofocus, topDocument's autofocus processed flag initially is false and is set to true after flushing autofocus candidates, i.e. flush of autofocus candidates only happens once per page load. In order to test the behaviour with both focus-without-user-activation on and off, two test files are necessary: - focus-without-user-activation-disabled-tentative.html - focus-without-user-activation-enabled-tentative.sub.html Skipping focus-without-user-activation-enabled-tentative.sub.html because the desired behaviour is not yet implemented. Bug: 1067482 Change-Id: I3d1c8f77309054bbad0e666543372e28040ddcd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202677Reviewed-by:Ian Clelland <iclelland@chromium.org> Commit-Queue: Charlie Hu <chenleihu@google.com> Cr-Commit-Position: refs/heads/master@{#772309}
Showing
Please register or sign in to comment