Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure test settings are fully reset between tests
Javascript can run after BlinkTestRunner::OnResetRendererAfterWebTest, dirtying TestRunner state for the next test. A navigation to about:blank is done after every test. This patch resets the TestRunner state after the navigation to about:blank, when we are sure no test javascript can change TestRunner state. This fixes a class of flaky bugs. This behavior happened with video-overlay-scroll.html which would set a custom layout dump (setCustomTextOutput) in a fullscreenchange event handler. This event handler was not removed at the end of the test (this will be fixed in a followup), and would run a second time, after the custom text output setting was reset. This caused later tests to run with custom text output from video-overlay-scroll.html. With this patch, video-scrolled-iframe.html is no longer flaky. Code in WebFrameTestProxy::BeginNavigation to intercept navigations relied on TestRunner::PolicyDelegateEnabled being reset before it ran. This patch now skips WebFrameTestProxy::BeginNavigation when the test is not running. Bug: 1048597 Change-Id: I888f7cc2ae91d7d3cfdd143a7573f62cb052c1cc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275348 Reviewed-by: danakj <danakj@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Philip Rogers <pdr@chromium.org> Auto-Submit: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#784110}
- Loading branch information