Commit b200a5df authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Fix LayoutBoxTest.MarkerContainerLayoutOverflowRect for LayoutNG

Bug: 878025
Change-Id: I8e65b6989cd6085d2b10717a46bfbccd54f735f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368155Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800358}
parent 91d6b1a9
...@@ -571,10 +571,6 @@ TEST_P(LayoutBoxTest, DelayedInvalidation) { ...@@ -571,10 +571,6 @@ TEST_P(LayoutBoxTest, DelayedInvalidation) {
} }
TEST_P(LayoutBoxTest, MarkerContainerLayoutOverflowRect) { TEST_P(LayoutBoxTest, MarkerContainerLayoutOverflowRect) {
// TODO(crbug.com/878025): The test fails in LayoutNG mode.
if (RuntimeEnabledFeatures::LayoutNGEnabled())
return;
SetBodyInnerHTML(R"HTML( SetBodyInnerHTML(R"HTML(
<style> <style>
html { font-size: 16px; } html { font-size: 16px; }
...@@ -586,9 +582,16 @@ TEST_P(LayoutBoxTest, MarkerContainerLayoutOverflowRect) { ...@@ -586,9 +582,16 @@ TEST_P(LayoutBoxTest, MarkerContainerLayoutOverflowRect) {
LayoutBox* marker_container = LayoutBox* marker_container =
ToLayoutBox(GetLayoutObjectByElementId("target")->SlowFirstChild()); ToLayoutBox(GetLayoutObjectByElementId("target")->SlowFirstChild());
// Unit marker_container's frame_rect which y-pos starts from 0 and marker's if (RuntimeEnabledFeatures::LayoutNGEnabled()) {
// frame_rect. EXPECT_GE(marker_container->Location().Y() +
EXPECT_TRUE(marker_container->LayoutOverflowRect().Height() > LayoutUnit(50)); marker_container->LayoutOverflowRect().MaxY(),
LayoutUnit(50));
} else {
// Unit marker_container's frame_rect which y-pos starts from 0 and marker's
// frame_rect in Legacy.
EXPECT_EQ(LayoutPoint(), marker_container->Location());
EXPECT_GE(marker_container->LayoutOverflowRect().MaxY(), LayoutUnit(50));
}
} }
static String CommonStyleForGeometryWithScrollbarTests() { static String CommonStyleForGeometryWithScrollbarTests() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment