| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
|
| index ba68026e7d176fafac752a41b441f7e4ec28877e..5357d802da7a6dfaa1ded4719812039820773592 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
|
| @@ -466,4 +466,34 @@ TEST_P(PaintPropertyTreeUpdateTest,
|
| EXPECT_EQ(nullptr, properties->transform());
|
| }
|
|
|
| +TEST_P(PaintPropertyTreeUpdateTest,
|
| + EffectNodeWithAnimationLosesNodeWhenAnimationRemoved) {
|
| + setBodyInnerHTML(
|
| + "<style>"
|
| + "div {"
|
| + " width: 100px;"
|
| + " height: 100px;"
|
| + " background-color: red;"
|
| + "} "
|
| + ".animate {"
|
| + " animation-name: test;"
|
| + " animation-duration: 4s;"
|
| + "}"
|
| + "@keyframes test {"
|
| + " from { opacity: 0.0;}"
|
| + " to { opacity: 1.0;}"
|
| + "}"
|
| + "</style>"
|
| + "<div id='target' class='animate'></div>");
|
| + Element* target = document().getElementById("target");
|
| + const ObjectPaintProperties* properties =
|
| + target->layoutObject()->paintProperties();
|
| + EXPECT_TRUE(properties->effect()->hasDirectCompositingReasons());
|
| +
|
| + // Removing the animation should remove the effect node.
|
| + target->removeAttribute(HTMLNames::classAttr);
|
| + document().view()->updateAllLifecyclePhases();
|
| + EXPECT_EQ(nullptr, properties->effect());
|
| +}
|
| +
|
| } // namespace blink
|
|
|