DescriptionPlzNavigate: 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.
Committed: https://crrev.com/987cb78dcfbb737f1042e2395ffba5a8ca1e590d
Cr-Commit-Position: refs/heads/master@{#412572}
Patch Set 1 #Patch Set 2 : Fix same-doc navigation + build, add passing tests #
Total comments: 4
Patch Set 3 : Response to review #
Total comments: 4
Patch Set 4 : Rebase #Patch Set 5 : Response to review + fix #Patch Set 6 : Rebase #
Dependent Patchsets: Messages
Total messages: 25 (11 generated)
|