Index: third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp |
index ca38e7dbde378cc0ca7de8fdf33e9bedec7527f2..7f471a7409afa566e75e4bd84c8ca87956e57542 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp |
@@ -118,8 +118,12 @@ TEST_F(LayoutObjectTest, MapToVisibleRectInAncestorSpace) |
container->setScrollTop(LayoutUnit(50)); |
LayoutRect rect(0, 60, 20, 20); |
- text->mapToVisibleRectInAncestorSpace(container, rect, nullptr); |
+ EXPECT_TRUE(text->mapToVisibleRectInAncestorSpace(container, rect, nullptr)); |
EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 20)); |
+ |
+ rect = LayoutRect(0, 60, 20, 0); |
+ EXPECT_TRUE(text->mapToVisibleRectInAncestorSpace(container, rect, nullptr, EdgeInclusive)); |
+ EXPECT_TRUE(rect == LayoutRect(0, 10, 20, 0)); |
chrishtr
2016/03/22 19:54:26
Why does this example yield a zero-area rect? Isn'
szager1
2016/03/23 23:26:59
No; the input rect has zero height, so the result
chrishtr
2016/03/24 21:18:43
?
|
} |
} // namespace blink |