mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
tests: Fix DOMTest failure with fractional devicePixelRatio
This commit is contained in:
@@ -137,10 +137,10 @@ class TestDOMVisitor : public CefDOMVisitor {
|
|||||||
|
|
||||||
// Returned bounds are in device pixels.
|
// Returned bounds are in device pixels.
|
||||||
CefRect divRect = divNode->GetElementBounds();
|
CefRect divRect = divNode->GetElementBounds();
|
||||||
EXPECT_EQ(divRect.width, 50.0 * devicePixelRatio);
|
EXPECT_NEAR(divRect.width, 50.0 * devicePixelRatio, 1);
|
||||||
EXPECT_EQ(divRect.height, 25.0 * devicePixelRatio);
|
EXPECT_NEAR(divRect.height, 25.0 * devicePixelRatio, 1);
|
||||||
EXPECT_EQ(divRect.x, 150.0 * devicePixelRatio);
|
EXPECT_NEAR(divRect.x, 150.0 * devicePixelRatio, 1);
|
||||||
EXPECT_EQ(divRect.y, 100.0 * devicePixelRatio);
|
EXPECT_NEAR(divRect.y, 100.0 * devicePixelRatio, 1);
|
||||||
|
|
||||||
EXPECT_FALSE(divNode->GetNextSibling().get());
|
EXPECT_FALSE(divNode->GetNextSibling().get());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user