DescriptionReplicate static layout test configuration to all renderers.
Currently BlinkTestController sends test configuration whenever the
RenderView gets a new host. This is insufficient in the long term - we
also need to send test configuration to renderers that do not host the
main frame. This CL will ensure that OOPIFs will have a correct value
of BlinkTestRunner::is_main_windows_, BlinkTestRunner::test_config_ and
other test flags that stay constant throughout the test. This CL also
paves the way for replicating dynamic test flags (i.e. dump_as_text or
wait_until_done) across OOPIFs in a future CL (i.e. the work-in-progress
CL at crrev.com/1715573002).
BlinkTestController already tracks all RenderProcessHosts to make sure
it can detect a crash not only in the main frame, but also in OOPIFs.
This CL extends this tracking to also send test configuration to new
RenderProcessHosts. The first message in a test will be a
ShellViewMsg_SetTestConfiguration; all subsequent renderers get
ShellViewMsg_ReplicateTestConfiguration (differentiation is needed to
avoid executing test initialization activities twice).
The test configuration ultimately needs to reach a BlinkTestRunner
instance in a specific RenderProcess. The CL accomplishes this by
sending a message to a RenderFrame known to be present in a new
RenderProcess - the message is received by LayoutTestRenderFrameObserver
and forwarded to the BlinkTestRunner singleton in the current process.
Other alternatives have been ruled out:
- Sending a message to a RenderView in a specific process is not
possible outside of //content internals.
- There is no way for BlinkTestRunner to intercept a message to a
RenderProcess.
The CL reuses BlinkTestController::send_configuration_to_next_host_
field to track whether it has already send the test configuration
to any render hosts. The new code seems consistent with the spirit
of https://crrev.com/12595002 which introduced this field.
BUG=587175
Committed: https://crrev.com/692a9e9ca5bb6d48b1d3c1e565be7205034e9a39
Cr-Commit-Position: refs/heads/master@{#379992}
Patch Set 1 #Patch Set 2 : Rebasing... #
Total comments: 2
Patch Set 3 : Rebasing... #
Total comments: 2
Patch Set 4 : Renamed a field to |did_send_initial_test_configuration_|. #Patch Set 5 : Rebasing... #
Messages
Total messages: 19 (10 generated)
|