DescriptionAdd a FOUC painting test.
This expands the Sim(ulation) testing framework to support a very rudimentary
compositor that can run a simple BeginMainFrame which runs the WebView's
beginFrame() and layout() steps followed by a simplified paint step which paints
the main layer of every composited layer mapping. This is a very rough
approximation of what the real compositor would do, but is enough to test the
code for avoiding FOUC in DeprecatedPaintLayerPainter's shouldSuppressPaintingLayer
and BlockPainter::paintContents. It's also enough to test the paint invalidation
logic in Document::styleResolverChanged for when we painted by skipping painting
the actual content because of the previously mentioned FOUC avoidance logic.
I also went and added a bunch of comments to the Sim* classes to explain what
they do and how to use the testing framework. A future patch may add a README
so we can use this framework to write future pipeline tests.
This was originally committed as:
https://src.chromium.org/viewvc/blink?view=rev&revision=201944
and reverted because the red background fill in debug builds makes the number
of draw commands vary from Debug to Release. This new patch introduces a
SimCanvas that collects the drawing commands and also disables the red debug
fill. This lets the test use stronger assertions and also means it works in
both Debug and Release builds.
BUG=521692
Committed: https://crrev.com/c999715896955a67460b3a543a76f4453dfe4012
git-svn-id: svn://svn.chromium.org/blink/trunk@202099 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 #Patch Set 2 : Make the repaint test actually work. #Patch Set 3 : Clean it up and fix assert. #Patch Set 4 : Clean up. #
Total comments: 6
Patch Set 5 : dglazkov@ review. #Patch Set 6 : Sync. #Patch Set 7 : Robust painting test. #Patch Set 8 : Robust painting test. #Patch Set 9 : fix build. #Patch Set 10 : fix build. #Messages
Total messages: 51 (19 generated)
|