DescriptionAdd a test that we resume commits after inserting the body.
To test our loading behavior we add a new framework of mocks for writing tests.
These allow simulating network responses in specific chunks so you can test how
the rendering engine reacts to having the content come off the wire. This
framework will be used to write future tests for various sub-systems as pages
are loading. Future loading/FOUC tests will check painting, layout and if frames
have been scheduled as well.
The test added in this patch writes html in chunks and checks that we only resume
pumping frames after the body has been inserted.
The test caught a bug in blink where we would resume commits when loading the
initial empty document because the document would insert an implicit <body>
calling into WebViewImpl::willInsertBody which then triggers a
resumeTreeViewCommits. This bug doesn't manifest when loading real tabs because
we always call resize(non-zero) after creating the WebView to set the initial
size. This then triggers a layout since the size is non-zero which then does
DeprecatedPaintLayerCompositor::didLayout and finally
enableCompositingModeIfNeeded which calls back into
WebViewImpl::setRootGraphicsLayer(nullptr) which then does setDeferCommits(true)
turning back on deferred commits. It looks like this bug may have manifested in
0x0 Android WebViews if they were created and then resized after they started
loading.
BUG=521692
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201405
Patch Set 1 #Patch Set 2 : remove extra incs. #
Total comments: 10
Patch Set 3 : dcheng@ review #
Messages
Total messages: 23 (9 generated)
|