PlzNavigate: Eliminate test_runner bailing out of layout tests too early
//components/test_runner signals that a test is finished if it receives a notificationDone signal from Javascript at a time when (a) it is waiting for such a signal, (b) it does not think it is in the midst of a load, and (c) it has no work in its queue. However, the definition of (b) is flawed for browser-side navigation. The current definition for being in the midst of a load is the time between WebFrameClient::didStartProvisionalLoad() being called and WebFrameClient::didStopLoading() being called. However, for browser-side navigations there is a period of time when navigation is ongoing but the renderer has not yet received the didStartProvisionalLoad() callback. If //components/test_runner gets a notificationDone signal during this period, it can erroneously think that the test is finished. This CL fixes the problem by having WebFrameTestProxy implement WebFrameClient::didStartLoading(), teaching //components/test_runner to be aware of the time period where a navigation is occurring, and using that as input to decide whether a test is finished when it receives a notificationDone signal. Review-Url: https://codereview.chromium.org/2147633003 Cr-Commit-Position: refs/heads/master@{#412572}
Showing
Please register or sign in to comment