| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| index d54efdb864f21e8c1135f1ca87e8739836eede18..bd9a0b02a5482e7e10b465f4cb14ae36c4504171 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| @@ -3138,4 +3138,15 @@ TEST_P(PaintPropertyTreeBuilderTest,
|
| !div->layoutObject()->paintProperties()->overflowClip());
|
| }
|
|
|
| +// A basic sanity check for over-invalidation of paint properties.
|
| +TEST_P(PaintPropertyTreeBuilderTest, NoPaintPropertyUpdateOnBackgroundChange) {
|
| + setBodyInnerHTML("<div id='div' style='background-color: blue'>DIV</div>");
|
| + auto* div = document().getElementById("div");
|
| +
|
| + document().view()->updateAllLifecyclePhases();
|
| + div->setAttribute(HTMLNames::styleAttr, "background-color: green");
|
| + document().view()->updateLifecycleToLayoutClean();
|
| + EXPECT_FALSE(div->layoutObject()->needsPaintPropertyUpdate());
|
| +}
|
| +
|
| } // namespace blink
|
|
|