| Index: third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| index 194ae5e604e12b76cd094bed82b273253e8e7973..8f76258d676c8a8721855fa796c5cb98cf06c951 100644
|
| --- a/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp
|
| @@ -84,6 +84,23 @@ TEST_F(ScrollAnchorTest, Basic)
|
| EXPECT_EQ(nullptr, scrollAnchor(viewport).anchorObject());
|
| }
|
|
|
| +TEST_F(ScrollAnchorTest, FractionalOffsetsAreRoundedBeforeComparing)
|
| +{
|
| + setBodyInnerHTML(
|
| + "<style> body { height: 1000px } </style>"
|
| + "<div id='block1' style='height: 50.4px'>abc</div>"
|
| + "<div id='block2' style='height: 100px'>def</div>");
|
| +
|
| + ScrollableArea* viewport = layoutViewport();
|
| + scrollLayoutViewport(DoubleSize(0, 100));
|
| +
|
| + document().getElementById("block1")->setAttribute(
|
| + HTMLNames::styleAttr, "height: 50.6px");
|
| + update();
|
| +
|
| + EXPECT_EQ(101, viewport->scrollPosition().y());
|
| +}
|
| +
|
| TEST_F(ScrollAnchorTest, UMAMetricUpdated)
|
| {
|
| HistogramTester histogramTester;
|
|
|