Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp |
| index e89af5b107787ae323f747ebc74f500f58fcfcd8..5d7f480a49cbad84194fba7e821b15cf1653ae13 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp |
| @@ -24,4 +24,13 @@ TEST_F(LayoutBoxTest, BackgroundObscuredInRect) |
| ASSERT_TRUE(layoutObject->backgroundIsKnownToBeObscured()); |
| } |
| +TEST_F(LayoutBoxTest, BackgroundRect) |
|
chrishtr
2016/08/12 17:03:00
Add more tests for other cases.
flackr
2016/08/16 17:52:51
I added tests which I think cover all of the speci
|
| +{ |
| + setBodyInnerHTML("<style>#target { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUg) border-box, green content-box; width: 100px; height: 100px; padding: 10px; border: 10px solid black;}</style>" |
| + "<div id='target'></div>"); |
| + LayoutBox* layoutBox = toLayoutBox(getLayoutObjectByElementId("target")); |
| + EXPECT_EQ(LayoutRect(20, 20, 100, 100), layoutBox->backgroundRect(OpaqueBackgroundRect)); |
| + EXPECT_EQ(LayoutRect(0, 0, 140, 140), layoutBox->backgroundRect(TranslucentBackgroundRect)); |
| +} |
| + |
| } // namespace blink |