Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp |
| index 48340a13b56ee05713cc599d501edd41d94c607e..6e65eac1d5678d4b2b669f7a73821c5fc6e08d90 100644 |
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp |
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp |
| @@ -647,30 +647,55 @@ TEST_F(CompositedLayerMappingTest, ShouldPaintBackgroundOntoScrollingContentsLay |
| "<div id='scroller5' class='scroller' style='background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUg) local, white local;'><div class='spacer'></div></div>" |
| "<div id='scroller6' class='scroller' style='background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUg) local, white padding-box; padding: 10px;'><div class='spacer'></div></div>" |
| "<div id='scroller7' class='scroller' style='background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUg) local, white content-box; padding: 10px;'><div class='spacer'></div></div>" |
| + "<div id='scroller8' class='scroller' style='background: white border-box;'><div class='spacer'></div></div>" |
| + "<div id='scroller9' class='scroller' style='background: white border-box; border: 10px solid black;'><div class='spacer'></div></div>" |
| + "<div id='scroller10' class='scroller' style='background: white border-box; border: 10px solid rgba(0, 0, 0, 0.5);'><div class='spacer'></div></div>" |
| + "<div id='scroller11' class='scroller' style='background: white content-box;'><div class='spacer'></div></div>" |
| + "<div id='scroller12' class='scroller' style='background: white content-box; padding: 10px;'><div class='spacer'></div></div>" |
| ); |
| - // First scroller cannot paint background into scrolling contents layer because it has a negative z-index child. |
| + // #scroller1 cannot paint background into scrolling contents layer because it has a negative z-index child. |
| EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller1")); |
| - // Second scroller cannot paint background into scrolling contents layer because it has a content-box clip without local attachment. |
| + // #scroller2 cannot paint background into scrolling contents layer because it has a content-box clip without local attachment. |
| EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller2")); |
| - // Third scroller can paint background into scrolling contents layer. |
| + // #scroller3 can paint background into scrolling contents layer. |
| EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller3")); |
| - // Fourth scroller cannot paint background into scrolling contents layer because the background image is not locally attached. |
| + // #scroller4 cannot paint background into scrolling contents layer because the background image is not locally attached. |
| EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller4")); |
| - // Fifth scroller can paint background into scrolling contents layer because both the image and color are locally attached. |
| + // #scroller5 can paint background into scrolling contents layer because both the image and color are locally attached. |
| EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller5")); |
| - // Sixth scroller can paint background into scrolling contents layer because the image is locally attached and even though |
| + // #scroller6 can paint background into scrolling contents layer because the image is locally attached and even though |
| // the color is not, it is filled to the padding box so it will be drawn the same as a locally attached background. |
| EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller6")); |
| - // Seventh scroller cannot paint background into scrolling contents layer because the color is filled to the content |
| + // #scroller7 cannot paint background into scrolling contents layer because the color is filled to the content |
| // box and we have padding so it is not equivalent to a locally attached background. |
| EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller7")); |
| + |
| + // #scroller8 can paint background into scrolling contents layer because its border-box is equivalent to its |
| + // padding box since it has no border. |
| + EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller8")); |
| + |
| + // #scroller9 can paint background into scrolling contents layer because its border is opaque so it completely |
| + // covers the background outside of the padding-box. |
| + EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller9")); |
| + |
| + // #scroller10 cannot paint background into scrolling contents layer because its border is partially transparent |
| + // so the background must be drawn to the border-box edges. |
| + EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller10")); |
| + |
| + // #scroller11 can paint background into scrolling contents layer because its content-box is equivalent to its |
| + // padding box since it has no padding |
|
chrishtr
2016/08/22 22:10:51
nit: add period.
flackr
2016/08/26 15:41:16
Done.
|
| + EXPECT_TRUE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller11")); |
| + |
| + // #scroller12 cannot paint background into scrolling contents layer because it has padding so its content-box |
| + // is not equivalent to its padding-box. |
| + EXPECT_FALSE(shouldPaintBackgroundOntoScrollingContentsLayer("scroller12")); |
| } |
| } // namespace blink |