| Index: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| index 5d9d39d7d4b3a543c444c81caf86a8ecbfd3f0cf..69ea1ba78a717d723c57f53e1e0991dc341bc357 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp
|
| @@ -1060,4 +1060,49 @@ TEST_P(PaintLayerPainterTest, DoPaintWithNonTinyOpacity) {
|
| PaintLayerPainter(*targetLayer).paintedOutputInvisible(paintingInfo));
|
| }
|
|
|
| +TEST_P(PaintLayerPainterTest, DoPaintWithEffectAnimationZeroOpacity) {
|
| + setBodyInnerHTML(
|
| + "<style> "
|
| + "div { "
|
| + " width: 100px; "
|
| + " height: 100px; "
|
| + " animation-name: example; "
|
| + " animation-duration: 4s; "
|
| + "} "
|
| + "@keyframes example { "
|
| + " from { opacity: 0.0;} "
|
| + " to { opacity: 1.0;} "
|
| + "} "
|
| + "</style> "
|
| + "<div id='target'></div>");
|
| + PaintLayer* targetLayer =
|
| + toLayoutBox(getLayoutObjectByElementId("target"))->layer();
|
| + PaintLayerPaintingInfo paintingInfo(nullptr, LayoutRect(),
|
| + GlobalPaintNormalPhase, LayoutSize());
|
| + EXPECT_FALSE(
|
| + PaintLayerPainter(*targetLayer).paintedOutputInvisible(paintingInfo));
|
| +}
|
| +
|
| +TEST_P(PaintLayerPainterTest, DoPaintWithTransformAnimationZeroOpacity) {
|
| + setBodyInnerHTML(
|
| + "<style> "
|
| + "div#target { "
|
| + " animation-name: example; "
|
| + " animation-duration: 4s; "
|
| + " opacity: 0.0; "
|
| + "} "
|
| + "@keyframes example { "
|
| + " from { transform: translate(0px, 0px); } "
|
| + " to { transform: translate(3em, 0px); } "
|
| + "} "
|
| + "</style> "
|
| + "<div id='target'>x</div></div>");
|
| + PaintLayer* targetLayer =
|
| + toLayoutBox(getLayoutObjectByElementId("target"))->layer();
|
| + PaintLayerPaintingInfo paintingInfo(nullptr, LayoutRect(),
|
| + GlobalPaintNormalPhase, LayoutSize());
|
| + EXPECT_FALSE(
|
| + PaintLayerPainter(*targetLayer).paintedOutputInvisible(paintingInfo));
|
| +}
|
| +
|
| } // namespace blink
|
|
|