Fix and reenable TopControlsSlideControllerTest.TestFocusEditableElements
This test verifies that when an editable element is focused within the page, top-chrome is forced-shown and is kept so until the element is blurred. The implementation of this behavior used the deprecated NotificationService for which we have now a replacement call in WebContentsObserver. This CL removes the use of the deprecated code. The flakiness in the test was due to a timing issue. In the cases when the test fails, I found that the generated fling events, cause gesture scrolling to be set to start and stop immediately in succession without generating any calls from the renderer to the browser to set the shown ratios. This was fixed by giving those events a chance to propagate, by waiting for at least 2 render frame submissions before generating the next one. With this fix, I ran the test with --gtest_repeat=40 and all instances passed. BUG=1049178 TEST=browser_tests --gtest_filter=TopControlsSlideControllerTest.*Editable* --test-launcher-bot-mode --gtest_repeat=40 Change-Id: I1ddfcfaf172e1fbcf1d6a851bb89ad051e1b8942 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2111064Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Ahmed Fakhry <afakhry@chromium.org> Cr-Commit-Position: refs/heads/master@{#751898}
Showing
Please register or sign in to comment