| 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 2beb445f2e7c408608ac559c201c07ff571fece2..83a5b14f99e54d15f6a3e4427662208f65f9db84 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp
|
| @@ -210,4 +210,25 @@ TEST_F(LayoutBoxTest, LocationContainerOfSVG) {
|
| EXPECT_TRUE(child->hasFlippedBlocksWritingMode());
|
| }
|
|
|
| +TEST_F(LayoutBoxTest, ControlClip) {
|
| + setBodyInnerHTML(
|
| + "<style>"
|
| + " * { margin: 0; }"
|
| + " #target {"
|
| + " position: relative;"
|
| + " width: 100px; height: 50px;"
|
| + " }"
|
| + "</style>"
|
| + "<input id='target' type='button' value='some text'/>");
|
| + LayoutBox* target = toLayoutBox(getLayoutObjectByElementId("target"));
|
| + EXPECT_TRUE(target->hasControlClip());
|
| + EXPECT_TRUE(target->hasClipRelatedProperty());
|
| + EXPECT_TRUE(target->shouldClipOverflow());
|
| +#if OS(MACOSX)
|
| + EXPECT_EQ(LayoutRect(0, 0, 100, 18), target->clippingRect());
|
| +#else
|
| + EXPECT_EQ(LayoutRect(2, 2, 96, 46), target->clippingRect());
|
| +#endif
|
| +}
|
| +
|
| } // namespace blink
|
|
|